Primary finding
selfJid/replySenderJid device-suffix stripping uses literal backslash-d regex, never matches
- src/web/auto-reply/monitor/group-gating.ts:118-120
The regex literal `/:\d+/` in source is `/:\\d+/` (escaped backslash followed by `d+`), which matches a colon followed by a literal backslash and one or more `d` characters – not a colon followed by digits. WhatsApp JIDs have device suffixes like `:12` separated by colon-digits. As a result, the device-suffix stripping intended to normalize JIDs before comparing for implicit reply-mention is a no-op. When `selfJid` is `12345@s.whatsapp.net` and `replyToSenderJid` is `12345:3@s.whatsapp.net` (or vice versa), the strings will not match and the implicit-mention detection (replies to the bot) silently fails. The E.164 fallback partially compensates only when both E.164 values are present; if only JIDs are available, the bot will fail to recognize replies and may skip messages that should be processed.
Recommendation
Use the regex literal `/:\d+/` (single backslash) so that JS source contains `replace(/:\d+/, "")`. The doubled backslash here was almost certainly a paste error from a JSON/string-escaped context.