Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Use raw string for regex here, otherwise \b is the backspace characte…
Browse files Browse the repository at this point in the history
…r. Fixes displayname matching.
  • Loading branch information
dbkr committed Oct 8, 2015
1 parent db6e1e1 commit 91482cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion synapse/push/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def _event_fulfills_condition(self, ev, condition, display_name, room_member_cou
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

Expand Down

0 comments on commit 91482cd

Please sign in to comment.