diff options
author | Erik Johnston <erikj@jki.re> | 2017-05-18 11:46:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-18 11:46:18 +0100 |
commit | 6e381180ae6fbfd630501342d186e64fbb34e648 (patch) | |
tree | 566ed163fdfbda19712ceb81c5d5ef76e1eb27cf /synapse/handlers/message.py | |
parent | Merge pull request #2231 from aaronraimist/patch-1 (diff) | |
parent | Add comment (diff) | |
download | synapse-6e381180ae6fbfd630501342d186e64fbb34e648.tar.xz |
Merge pull request #2177 from matrix-org/erikj/faster_push_rules
Make calculating push actions faster
Diffstat (limited to 'synapse/handlers/message.py')
-rw-r--r-- | synapse/handlers/message.py | 5 |
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 ) |