From 6641bad337668d23344b21a724e3e5f61e561158 Mon Sep 17 00:00:00 2001 From: kimkitsuragi26 Date: Fri, 27 Feb 2026 11:45:44 +0800 Subject: [PATCH] feat(feishu): make reaction emoji configurable Replace hardcoded THUMBSUP with configurable react_emoji field in FeishuConfig, consistent with SlackConfig.react_emoji pattern. Default remains THUMBSUP for backward compatibility. --- nanobot/channels/feishu.py | 2 +- nanobot/config/schema.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/nanobot/channels/feishu.py b/nanobot/channels/feishu.py index 480bf7b..4a6312e 100644 --- a/nanobot/channels/feishu.py +++ b/nanobot/channels/feishu.py @@ -692,7 +692,7 @@ class FeishuChannel(BaseChannel): msg_type = message.message_type # Add reaction - await self._add_reaction(message_id, "THUMBSUP") + await self._add_reaction(message_id, self.config.react_emoji) # Parse content content_parts = [] diff --git a/nanobot/config/schema.py b/nanobot/config/schema.py index 61aee96..d83967c 100644 --- a/nanobot/config/schema.py +++ b/nanobot/config/schema.py @@ -42,6 +42,7 @@ class FeishuConfig(Base): encrypt_key: str = "" # Encrypt Key for event subscription (optional) verification_token: str = "" # Verification Token for event subscription (optional) allow_from: list[str] = Field(default_factory=list) # Allowed user open_ids + react_emoji: str = "THUMBSUP" # Emoji type for message reactions (e.g. THUMBSUP, OK, DONE, SMILE) class DingTalkConfig(Base):