only do word-boundary patches on bodies for now

This commit is contained in:
Matthew Hodgson 2015-02-09 16:44:47 +00:00
parent 76c5a5c2f6
commit a578251b48
2 changed files with 5 additions and 2 deletions

View File

@ -147,7 +147,10 @@ class Pusher(object):
logger.warn("event_match condition with no pattern")
return False
# XXX: optimisation: cache our pattern regexps
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

View File

@ -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"],