mirror of
https://github.com/element-hq/synapse.git
synced 2026-08-28 00:44:35 +00:00
Use raw string for regex here, otherwise \b is the backspace character. Fixes displayname matching.
This commit is contained in:
@@ -186,7 +186,7 @@ class Pusher(object):
|
||||
if not display_name:
|
||||
return False
|
||||
return re.search(
|
||||
"\b%s\b" % re.escape(display_name), ev['content']['body'],
|
||||
r"\b%s\b" % re.escape(display_name), ev['content']['body'],
|
||||
flags=re.IGNORECASE
|
||||
) is not None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user