fix(event): acknowledge card action callbacks - #2456
Conversation
|
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughChangesFeishu card action dispatch
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The change returns the required acknowledgement for card action callbacks while preserving raw event emission, and the listed checks are complete; no actionable merge-blocking risk remains. Sequence Diagram(s)sequenceDiagram
participant FeishuWebsocketIngress
participant registerHandlers
participant OnP2CardActionTrigger
participant RawEventHandler
FeishuWebsocketIngress->>registerHandlers: Register card.action.trigger
FeishuWebsocketIngress->>OnP2CardActionTrigger: Dispatch card action event
OnP2CardActionTrigger->>RawEventHandler: Forward event request
OnP2CardActionTrigger-->>FeishuWebsocketIngress: Return empty CardActionTriggerResponse
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Register
card.action.triggerwith the SDK's typed Card 2.0 callback handler so the WebSocket client returns the required{}acknowledgement instead of treating the callback as a generic custom event. This prevents Feishu callback error108002while preserving the existing raw event emission contract.Changes
card.action.triggerthroughOnP2CardActionTrigger; keep all other event types onOnCustomizedEvent.CardActionTriggerResponse{}after the existing raw handler succeeds.Test Plan
go test ./internal/event/adapter/lark/websocketmake unit-testmake vetmake fmt-checkRelated Issues
Summary by CodeRabbit