Skip to content

fix(ws): dispatch card callback frames - #177

Open
Keithin wants to merge 1 commit into
larksuite:v2_mainfrom
Keithin:fix/ws-card-frame-dispatch
Open

Keithin wants to merge 1 commit into
larksuite:v2_mainfrom
Keithin:fix/ws-card-frame-dispatch

Conversation

@Keithin

@Keithin Keithin commented Nov 11, 2026

Copy link
Copy Markdown

Summary

The WebSocket client returns early for data frames with type card. When a card.action.trigger callback arrives in such a frame, the registered callback is never invoked and the client sends no reply.

Route CARD frames through the same dispatcher and response handling as EVENT frames. This uses the SDK's existing card callback registration and response serialization.

Hermes currently pins lark-oapi==1.7.5, which has the same early return. See the Hermes maintainer's review for the downstream context.

Verification

  • Feed a serialized data frame containing a synthetic card.action.trigger payload into the SDK receive handler. The EVENT case passed before the change, while the CARD case failed with zero callback invocations. Both now invoke the registered handler once and serialize its toast into a successful WebSocket response.
  • python -m pytest -q lark_oapi/ws/tests lark_oapi/event/tests lark_oapi/channel/tests — 767 passed on macOS with Python 3.12.
  • The test exercises the SDK receive path locally with a mocked WebSocket write. Live Feishu delivery was not tested.

@CLAassistant

CLAassistant commented Nov 11, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants