feat(feishu): add done emoji support for reaction lifecycle (#2899)

* feat(feishu): add done emoji support for reaction lifecycle

* feat(feishu): add done emoji support and update documentation
This commit is contained in:
Jiajun
2026-04-10 12:29:43 +08:00
committed by Xubin Ren
parent e0c6e6f180
commit ce9829e92f
2 changed files with 8 additions and 0 deletions
+4
View File
@@ -250,6 +250,7 @@ class FeishuConfig(Base):
verification_token: str = ""
allow_from: list[str] = Field(default_factory=list)
react_emoji: str = "THUMBSUP"
done_emoji: str | None = None # Emoji to show when task is completed (e.g., "DONE", "OK")
group_policy: Literal["open", "mention"] = "mention"
reply_to_message: bool = False # If True, bot replies quote the user's original message
streaming: bool = True
@@ -1274,6 +1275,9 @@ class FeishuChannel(BaseChannel):
if meta.get("_stream_end"):
if (message_id := meta.get("message_id")) and (reaction_id := meta.get("reaction_id")):
await self._remove_reaction(message_id, reaction_id)
# Add completion emoji if configured
if self.config.done_emoji and message_id:
await self._add_reaction(message_id, self.config.done_emoji)
buf = self._stream_bufs.pop(chat_id, None)
if not buf or not buf.text: