EveCogs/wormhole
Viktor AI f1c8970d3d fix: raw string in mention_policy regex crashes every relay (v3.4.3)
Root cause: apply_mention_policy() in utils.py used raw strings for
re.sub replacement arguments:
  re.sub(r'<@&(\d+)>', r'@\u200brole', content)

The r-prefix makes \u200b literal backslash-u instead of Unicode ZWSP.
Python's re.sub always validates the replacement template, so \u at
position 1 raises re.error on EVERY message — even without matches.

Since _DEFAULT_NETWORK sets mention_policy.allow_role_mentions=False,
this code path runs for all networks, causing _do_relay to throw on
every single message. The exception was caught by on_message's
try/except, silently killing relay with total_messages stuck at 0.

Fix: remove r-prefix from replacement strings so \u200b is correctly
interpreted as the Unicode zero-width space character.
2026-05-12 14:52:22 +00:00
..
__init__.py v3.2.0 — Phase 3: DM relay, starboard, karma, auto-mod, highlights, search & more 2026-05-07 22:19:09 +00:00
info.json fix: raw string in mention_policy regex crashes every relay (v3.4.3) 2026-05-12 14:52:22 +00:00
utils.py fix: raw string in mention_policy regex crashes every relay (v3.4.3) 2026-05-12 14:52:22 +00:00
wormhole.py feat: add relay diagnostic commands (relaydebug, testsend, tracemode) 2026-05-12 13:38:15 +00:00