diff options
author | Erik Johnston <erik@matrix.org> | 2018-02-06 17:27:00 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2018-02-07 10:34:09 +0000 |
commit | 50fe92cd26d06cd09a722521488bea2a9d1ffdea (patch) | |
tree | 4e833aabdb856cbb9dd50a015d1ffe500b50da1b /synapse/handlers/message.py | |
parent | Add event_creator worker (diff) | |
download | synapse-50fe92cd26d06cd09a722521488bea2a9d1ffdea.tar.xz |
Move presence handling into handle_new_client_event
As we want to have it run on the main synapse instance
Diffstat (limited to 'synapse/handlers/message.py')
-rw-r--r-- | synapse/handlers/message.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py index 92c153f300..6be3f4d770 100644 --- a/synapse/handlers/message.py +++ b/synapse/handlers/message.py @@ -423,12 +423,6 @@ class EventCreationHandler(object): ratelimit=ratelimit, ) - if event.type == EventTypes.Message: - presence = self.hs.get_presence_handler() - # We don't want to block sending messages on any presence code. This - # matters as sometimes presence code can take a while. - preserve_fn(presence.bump_presence_active_time)(user) - @defer.inlineCallbacks def deduplicate_state_event(self, event, context): """ @@ -708,3 +702,9 @@ class EventCreationHandler(object): ) preserve_fn(_notify)() + + if event.type == EventTypes.Message: + presence = self.hs.get_presence_handler() + # We don't want to block sending messages on any presence code. This + # matters as sometimes presence code can take a while. + preserve_fn(presence.bump_presence_active_time)(requester.user) |