-
-
Notifications
You must be signed in to change notification settings - Fork 79.2k
Include participant identity and quoted reply context in gateway inbound log #63589
Copy link
Copy link
Open
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:data-lossCan lose, corrupt, or silently drop user/session/config data.Can lose, corrupt, or silently drop user/session/config data.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:data-lossCan lose, corrupt, or silently drop user/session/config data.Can lose, corrupt, or silently drop user/session/config data.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Problem
When WhatsApp group messages are logged by the gateway, the
inboundLogger.info()call only writes{from, to, body, timestamp}to the log file. Thefromfield is the group JID, so there is no way to identify which participant sent the message. Quoted reply context (the message being replied to) is also absent.This matters for any downstream processing of group messages outside of a live session — for example, a cron job that extracts group messages from the log to monitor a family WhatsApp group for itinerary changes.
Current behaviour
The gateway's
enqueueInboundMessage()already builds a richinboundMessageobject with:senderJid,senderE164,senderName— participant identityreplyToId— stanza ID of the quoted messagereplyToBody— text of the quoted messagereplyToSender,replyToSenderJid,replyToSenderE164— who was quotedFor messages that reach the agent (pass mention gating), this data is formatted beautifully into the message body —
[Replying to <sender>] <quoted body> [/Replying]and[from: Sender Name (+E164)]. This works perfectly.But the
inboundLogger.info()call discards all of this:Requested change
Include participant identity and reply context fields in the logged object:
This is a minimal change — the data is already computed, it just needs to be included in the log line.
Use case
I have a cron job that monitors a family holiday WhatsApp group (with
requireMention: true) by parsing the gateway log. Messages filtered by mention gating are still logged, which is great — but without participant identity, I can't tell who said what, and without quoted reply context, I can't follow threaded conversations like:Currently this appears as three anonymous messages with no threading.
Environment
groupPolicy: "open", group-levelrequireMention: true