mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Use raw string for regex here, otherwise \b is the backspace character. Fixes displayname matching.
This commit is contained in:
parent
db6e1e1fe3
commit
91482cd6a0
@ -186,7 +186,7 @@ class Pusher(object):
|
|||||||
if not display_name:
|
if not display_name:
|
||||||
return False
|
return False
|
||||||
return re.search(
|
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
|
flags=re.IGNORECASE
|
||||||
) is not None
|
) is not None
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user