mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04: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")
|
logger.warn("event_match condition with no pattern")
|
||||||
return False
|
return False
|
||||||
# XXX: optimisation: cache our pattern regexps
|
# XXX: optimisation: cache our pattern regexps
|
||||||
|
if condition['key'] == 'content.body':
|
||||||
r = r'\b%s\b' % self._glob_to_regexp(condition['pattern'])
|
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)
|
val = _value_for_dotted_key(condition['key'], ev)
|
||||||
if val is None:
|
if val is None:
|
||||||
return False
|
return False
|
||||||
|
@ -6,7 +6,7 @@ logger = logging.getLogger(__name__)
|
|||||||
REQUIREMENTS = {
|
REQUIREMENTS = {
|
||||||
"syutil==0.0.2": ["syutil"],
|
"syutil==0.0.2": ["syutil"],
|
||||||
"matrix_angular_sdk==0.6.0": ["syweb>=0.6.0"],
|
"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"],
|
"service_identity>=1.0.0": ["service_identity>=1.0.0"],
|
||||||
"pyopenssl>=0.14": ["OpenSSL>=0.14"],
|
"pyopenssl>=0.14": ["OpenSSL>=0.14"],
|
||||||
"pyyaml": ["yaml"],
|
"pyyaml": ["yaml"],
|
||||||
|
Loading…
Reference in New Issue
Block a user