Skip to content

fix(feishu): add extra_ua_tags=["channel"] to FeishuWSClient for group @mention delivery - #52908

Closed
luxuguang-leo wants to merge 1 commit into
NousResearch:mainfrom
luxuguang-leo:fix/feishu-group-mention
Closed

luxuguang-leo wants to merge 1 commit into
NousResearch:mainfrom
luxuguang-leo:fix/feishu-group-mention

Conversation

@luxuguang-leo

Copy link
Copy Markdown
Contributor

Problem

Group @mention messages are not delivered over WebSocket transport.
The Feishu server silently drops group events because the WebSocket
connection was not tagged as a "channel" connection.

Root Cause

FeishuWSClient was created without any UA signaling tag. The server
defaulted to basic DM-only push mode and never sent group @mention events.

Fix

Added extra_ua_tags=["channel"] to the FeishuWSClient constructor call
in _connect_websocket(). This tells the Feishu server to use the Channel
protocol, which enables group-message routing in addition to P2P DM.

The native lark_oapi.channel.FeishuChannel uses the same mechanism
internally (verified against lark_oapi source).

Fixes #50656

Testing

  • New regression test: test_connect_websocket_sets_channel_ua_tag
  • All 206 existing feishu tests pass

References

…p @mention delivery

Without this UA tag the Feishu server does not push group @mention events
over the WebSocket transport. The "channel" tag tells the server to use
the Channel protocol which enables group-message routing in addition to P2P
direct messages.

Root cause: FeishuWSClient was created without any UA signaling tag, so the
server defaulted to the basic DM-only push mode. Group @mention events were
silently dropped before reaching Hermes.

Fixes NousResearch#50656

Also adds a regression test verifying the UA tag is present in the
FeishuWSClient constructor call.
@alt-glitch alt-glitch added type/bug Something isn't working comp/gateway Gateway runner, session dispatch, delivery platform/feishu Feishu / Lark adapter P3 Low — cosmetic, nice to have labels Jun 26, 2026
@alt-glitch

Copy link
Copy Markdown
Contributor

This was generated by AI during triage.

Fix PR for #50656 (Feishu group @mention messages not delivered over WebSocket). The extra_ua_tags=["channel"] mechanism is distinct from the require_mention/channel_prompts config PRs in this area.

@leididi

leididi commented Jul 3, 2026

Copy link
Copy Markdown

I successfully used this method to get the AI to fix the Lark group chat function. Please release it in the latest version as soon as possible. Thank you.

@luxuguang-leo

Copy link
Copy Markdown
Contributor Author

Quick check-in on this one. Same situation as my other PRs — the check suites are stuck at action_required, so CI hasn't run yet. Is there anything else needed on this PR, or any additional changes you'd like to see before the approach can move forward?

This fixes group @mention delivery over WebSocket on Feishu — leididi mentioned it resolved the issue. Happy to make adjustments if needed.

@alt-glitch alt-glitch added P2 Medium — degraded but workaround exists sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have and removed P3 Low — cosmetic, nice to have comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists labels Jul 5, 2026
@teknium1

Copy link
Copy Markdown
Collaborator

Merged via PR #61770. Your Feishu Channel signaling fix was cherry-picked onto current main, the shipped SDK dependency was upgraded to support the new constructor argument, and real SDK compatibility coverage was added. Your authorship is preserved in git history. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have platform/feishu Feishu / Lark adapter sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Feishu/Lark group @mention messages not delivered — WebSocket never receives group events

4 participants