fix: use typing reaction for Feishu messages
Replace the default Pin reaction with Typing (敲键盘). Keep configured random reaction emojis taking precedence. Update Feishu channel documentation across translations. Validated with channel tests, docs lint and a live home-dev check.
This commit is contained in:
1 parent
97506cd4f8
commit
c1ce9fda5f
7 files changed
+9
-9
No files matched your search
@@ -422,8 +422,8 @@ func (c *FeishuChannel) FinalizeToolFeedbackMessage(ctx context.Context, msg bus
|
||||
// ReactToMessage implements channels.ReactionCapable.
|
||||
// Adds a reaction (randomly chosen from config) and returns an undo function to remove it.
|
||||
func (c *FeishuChannel) ReactToMessage(ctx context.Context, chatID, messageID string) (func(), error) {
|
||||
// Get emoji list from config (Feishu emoji_type keys, e.g. Pin, THUMBSUP).
|
||||
// Ignore empty entries so a list like ["", "Pin"] does not randomly pick "" (API 231001).
|
||||
// Get emoji list from config (Feishu emoji_type keys, e.g. Typing, THUMBSUP).
|
||||
// Ignore empty entries so a list like ["", "Typing"] does not randomly pick "" (API 231001).
|
||||
var candidates []string
|
||||
for _, e := range c.config.RandomReactionEmoji {
|
||||
e = strings.TrimSpace(e)
|
||||
@@ -431,7 +431,7 @@ func (c *FeishuChannel) ReactToMessage(ctx context.Context, chatID, messageID st
|
||||
candidates = append(candidates, e)
|
||||
}
|
||||
}
|
||||
chosenEmoji := "Pin"
|
||||
chosenEmoji := "Typing" // 敲键盘
|
||||
if len(candidates) > 0 {
|
||||
chosenEmoji = candidates[rand.Intn(len(candidates))]
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user