diff options
author | Matthew Hodgson <matthew@matrix.org> | 2015-02-09 16:44:47 +0000 |
---|---|---|
committer | Matthew Hodgson <matthew@matrix.org> | 2015-02-09 16:44:47 +0000 |
commit | a578251b4800f20424e8b294a42cc6c65ef568a2 (patch) | |
tree | 6c9d3303261b6f43af6690299b1f3259399db4b5 | |
parent | Merge pull request #55 from matrix-org/profiling (diff) | |
download | synapse-a578251b4800f20424e8b294a42cc6c65ef568a2.tar.xz |
only do word-boundary patches on bodies for now
Diffstat (limited to '')
-rw-r--r-- | synapse/push/__init__.py | 5 | ||||
-rw-r--r-- | synapse/python_dependencies.py | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/synapse/push/__init__.py b/synapse/push/__init__.py index 07b5f0187c..58c8cf700b 100644 --- a/synapse/push/__init__.py +++ b/synapse/push/__init__.py @@ -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 diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index a89d618606..f429d1beda 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -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"], |