fix: detect @-mentions in type-49 (appmsg) content XML#145
Merged
thisnick merged 1 commit intothisnick:mainfrom Apr 1, 2026
Merged
fix: detect @-mentions in type-49 (appmsg) content XML#145thisnick merged 1 commit intothisnick:mainfrom
thisnick merged 1 commit intothisnick:mainfrom
Conversation
For reference/quote messages (type=49), WeChat may place <atuserlist> inside the content XML rather than the source column. This caused @-mentions in quoted replies to be silently missed. Now falls back to checking content XML for type-49 messages when source XML has no mention, ensuring quoted replies with @-mentions are properly detected. Fixes: group chat replies via quote not triggering bot response
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
For reference/quote messages (type=49, i.e. when a user long-presses a message and replies with a quote), WeChat places
<atuserlist>inside the content XML column rather than the source column.The current
check_is_mentioned()only inspects the source XML, so @-mentions in quoted replies are silently missed — the message gets buffered but never dispatched.Fix
After checking the source XML, fall back to checking the content XML for type-49 messages. This ensures quoted replies containing @-mentions are properly detected.
Impact
Related
Related to #126 — both stem from incomplete handling of type-49 (appmsg) messages. This PR fixes mention detection; #126 covers the broader issue of parsing combined/forwarded message content.