Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion gateway/platforms/feishu.py
Original file line number Diff line number Diff line change
Expand Up @@ -3249,7 +3249,14 @@ async def _send_raw_message(
content=payload,
uuid_value=str(uuid.uuid4()),
)
request = self._build_create_message_request("chat_id", body)
# Infer receive_id_type from chat_id prefix to support open_id (ou_) and union_id (on_)
if chat_id.startswith("ou_"):
rid_type = "open_id"
elif chat_id.startswith("on_"):
rid_type = "union_id"
else:
rid_type = "chat_id"
request = self._build_create_message_request(rid_type, body)
return await asyncio.to_thread(self._client.im.v1.message.create, request)

@staticmethod
Expand Down