mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-25 12:29:21 -05:00
only do word-boundary patches on bodies for now
This commit is contained in:
parent
76c5a5c2f6
commit
a578251b48
@ -147,7 +147,10 @@ class Pusher(object):
|
||||
logger.warn("event_match condition with no pattern")
|
||||
return False
|
||||
# XXX: optimisation: cache our pattern regexps
|
||||
r = r'\b%s\b' % self._glob_to_regexp(condition['pattern'])
|
||||
if condition['key'] == 'content.body':
|
||||
r = r'\b%s\b' % self._glob_to_regexp(condition['pattern'])
|
||||
else:
|
||||
r = r'^%s$' % self._glob_to_regexp(condition['pattern'])
|
||||
val = _value_for_dotted_key(condition['key'], ev)
|
||||
if val is None:
|
||||
return False
|
||||
|
@ -6,7 +6,7 @@ logger = logging.getLogger(__name__)
|
||||
REQUIREMENTS = {
|
||||
"syutil==0.0.2": ["syutil"],
|
||||
"matrix_angular_sdk==0.6.0": ["syweb>=0.6.0"],
|
||||
"Twisted==14.0.2": ["twisted==14.0.2"],
|
||||
"Twisted==14.0.0": ["twisted==14.0.0"],
|
||||
"service_identity>=1.0.0": ["service_identity>=1.0.0"],
|
||||
"pyopenssl>=0.14": ["OpenSSL>=0.14"],
|
||||
"pyyaml": ["yaml"],
|
||||
|
Loading…
Reference in New Issue
Block a user