GPT-5 finding
Implicit mention detection uses incorrect regex; device suffix not stripped from JIDs
- src/web/auto-reply/monitor/group-gating.ts:121-123
The pattern /:\d+/ in a regex literal matches a colon followed by a literal backslash and one or more 'd' characters, not digits. This fails to strip the ":<digits>" device suffix (e.g., ":1"). As a result, implicitMention may be false when reply-to sender equals self except for differing device suffixes.
Recommendation
Use a correct digit-matching pattern, ideally anchored to the end: replace(/:\d+$/, ""). This reliably removes a trailing ":<digits>" device suffix for both selfJid and replySenderJid. Alternatively, parse JIDs via a helper that normalizes device suffixes.