fix(feishu): skip typing indicator keepalive re-adds to prevent notification spam (#31580)

* fix(feishu): skip typing indicator keepalive re-adds to prevent notification spam

The typing keepalive loop calls addTypingIndicator() every 3 seconds,
which creates a new messageReaction.create API call each time. Feishu
treats each re-add as a new reaction event and fires a push notification,
causing users to receive repeated notifications while waiting for a
response.

Unlike Telegram/Discord where typing status expires after a few seconds,
Feishu reactions persist until explicitly removed. Skip the keepalive
re-add when a reaction already exists (reactionId is set) since there
is no need to refresh it.

Closes #28660

* Changelog: note Feishu typing keepalive suppression

---------

Co-authored-by: yuxh1996 <yuxh1996@users.noreply.github.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
This commit is contained in:
dongdong
2026-03-03 09:11:47 +08:00
committed by GitHub
parent 42626648d7
commit 46df7e2421
2 changed files with 7 additions and 0 deletions

View File

@@ -94,6 +94,12 @@ export function createFeishuReplyDispatcher(params: CreateFeishuReplyDispatcherP
) {
return;
}
// Feishu reactions persist until explicitly removed, so skip keepalive
// re-adds when a reaction already exists. Re-adding the same emoji
// triggers a new push notification for every call (#28660).
if (typingState?.reactionId) {
return;
}
typingState = await addTypingIndicator({
cfg,
messageId: replyToMessageId,