summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2017-05-18 11:46:18 +0100
committerGitHub <noreply@github.com>2017-05-18 11:46:18 +0100
commit6e381180ae6fbfd630501342d186e64fbb34e648 (patch)
tree566ed163fdfbda19712ceb81c5d5ef76e1eb27cf /synapse/handlers
parentMerge pull request #2231 from aaronraimist/patch-1 (diff)
parentAdd comment (diff)
downloadsynapse-6e381180ae6fbfd630501342d186e64fbb34e648.tar.xz
Merge pull request #2177 from matrix-org/erikj/faster_push_rules
Make calculating push actions faster
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/message.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index 196925edad..ba8776f288 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -54,6 +54,8 @@ class MessageHandler(BaseHandler):
         # This is to stop us from diverging history *too* much.
         self.limiter = Limiter(max_count=5)
 
+        self.action_generator = ActionGenerator(self.hs)
+
     @defer.inlineCallbacks
     def purge_history(self, room_id, event_id):
         event = yield self.store.get_event(event_id)
@@ -590,8 +592,7 @@ class MessageHandler(BaseHandler):
                 "Changing the room create event is forbidden",
             )
 
-        action_generator = ActionGenerator(self.hs)
-        yield action_generator.handle_push_actions_for_event(
+        yield self.action_generator.handle_push_actions_for_event(
             event, context
         )