-
-
Notifications
You must be signed in to change notification settings - Fork 76
fix(message): align interactive button stanza metadata #277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -637,6 +637,7 @@ export class WaMessageDispatchCoordinator { | |||||
| const outboundAttrs = resolveOutboundMessageAttrs(messageWithIcdc) | ||||||
| const buttonAddonKind = outboundAttrs.buttonAddonKind | ||||||
| const buttonAddonNode = buttonAddonKind ? buildButtonAddonNode(buttonAddonKind) : undefined | ||||||
| const isInteractiveNativeFlow = !!unwrapMessage(messageWithIcdc).interactiveMessage | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Prompt for AI agents
Suggested change
|
||||||
| // when a <biz> companion is attached the stanza must advertise type=text and | ||||||
| // omit enc.mediatype; sending type=media + mediatype=list/button alongside the | ||||||
| // companion is rejected by the server as SMAX_INVALID (479). | ||||||
|
|
@@ -663,7 +664,15 @@ export class WaMessageDispatchCoordinator { | |||||
| mediatype, | ||||||
| decryptFail, | ||||||
| customNodes: customNodes.length > 0 ? customNodes : undefined, | ||||||
| sendOptions | ||||||
| sendOptions: isInteractiveNativeFlow | ||||||
| ? { | ||||||
| ...sendOptions, | ||||||
| additionalAttributes: { | ||||||
| ...sendOptions.additionalAttributes, | ||||||
| device_fanout: 'false' | ||||||
| } | ||||||
| } | ||||||
| : sendOptions | ||||||
| } | ||||||
|
|
||||||
| const peerRecipientPn = isGroup | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: vinikjkkj/zapo
Length of output: 11892
🤖 get_repo_knowledge executed:
get_repo_knowledge vinikjkkj/zapo /tmp/coderabbit-repo-knowledge/vinikjkkj-zapo-0d4f62c1/architecture /tmp/coderabbit-repo-knowledge/vinikjkkj-zapo-0d4f62c1/conventionsLength of output: 45948
🏁 Script executed:
Repository: vinikjkkj/zapo
Length of output: 50370
🏁 Script executed:
Repository: vinikjkkj/zapo
Length of output: 16407
Restrict the predicate to
nativeFlowMessage.InteractiveMessagealso supports storefront, collection, carousel, and Bloks payloads. The current check can setdevice_fanout: 'false'for those non-native-flow messages. CheckinteractiveMessage?.nativeFlowMessageinstead, and add native-flow and non-native interactive coverage.🤖 Prompt for AI Agents
Source: Coding guidelines