You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
handle BlueBubbles group webhook payloads whose stable chat GUID is nested under data.chats[0]["[auth-key]"]
use nested chatIdentifier / identifier / displayName as fallback chat identifiers
treat BlueBubbles style >= 43 as group evidence for mention gating
add regression tests that replay the sanitized payload through _handle_webhook()
isolate BlueBubbles tests from ambient BLUEBUBBLES_MENTION_PATTERNS env
Why
This covers a payload shape not handled by the existing chats[0].guid fallback from #8514 / #9806. Without it, Hermes can lose group chat identity and treat a group webhook as a DM.
I opened #38379 as a combined fix that includes this payload-shape fix plus the duplicate/update-echo ordering fix from #30708.
This PR (#38342) is still correct for the nested [auth-key] group payload, but by itself it does not stop BlueBubbles updated-message echoes from producing a second route/session. Conversely, #30996 stops duplicate replies but can still preserve the wrong route if the sparse update event arrives first.
Thanks for the focused BlueBubbles regression fix. The premise remains on current main: gateway/platforms/bluebubbles.py:977-988 only reads the conventional nested GUID and top-level identifiers; :1001-1007 can then fall back to the sender and classify the event as a DM. The PR adds the missing nested [auth-key] and identifier sources, plus style >= 43 group evidence, at the same webhook resolution point.
The added tests exercise _handle_webhook() rather than only helper extraction and verify both mention suppression and the resulting group source route. The contributor's follow-up correctly identifies updated-message ordering as a separate concern tracked by still-open #38379; it does not invalidate this payload-shape fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
comp/gatewayGateway runner, session dispatch, deliveryP2Medium — degraded but workaround existssweeper:blast-moderateSweeper blast radius: moderate — a subsystem or single platformsweeper:risk-message-deliverySweeper risk: may drop, duplicate, misroute, or suppress messagessweeper:risk-session-stateSweeper risk: may lose/corrupt/mis-associate session or context statetype/bugSomething isn't working
3 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
data.chats[0]["[auth-key]"]chatIdentifier/identifier/displayNameas fallback chat identifiersstyle >= 43as group evidence for mention gating_handle_webhook()BLUEBUBBLES_MENTION_PATTERNSenvWhy
This covers a payload shape not handled by the existing
chats[0].guidfallback from #8514 / #9806. Without it, Hermes can lose group chat identity and treat a group webhook as a DM.Fixes #38339.
Test plan