fix(feishu): only stream visible cards

This commit is contained in:
Xubin Ren
2026-03-27 21:59:11 +08:00
committed by Xubin Ren
parent 0ba71298e6
commit e464a81545
2 changed files with 16 additions and 2 deletions
+5 -2
View File
@@ -973,11 +973,14 @@ class FeishuChannel(BaseChannel):
return None
card_id = getattr(response.data, "card_id", None)
if card_id:
self._send_message_sync(
message_id = self._send_message_sync(
receive_id_type, chat_id, "interactive",
json.dumps({"type": "card", "data": {"card_id": card_id}}),
)
return card_id
if message_id:
return card_id
logger.warning("Created streaming card {} but failed to send it to {}", card_id, chat_id)
return None
except Exception as e:
logger.warning("Error creating streaming card: {}", e)
return None