diff options
author | Erik Johnston <erikj@jki.re> | 2017-06-07 14:01:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-07 14:01:06 +0100 |
commit | a053ff397946ed6184e56f37013d0fa9d379d2ff (patch) | |
tree | ff1144dbe7bfc0dd281fdc9cf29cfa77bae0054a /synapse/handlers | |
parent | Add some logging to user directory (diff) | |
parent | Comments (diff) | |
download | synapse-a053ff397946ed6184e56f37013d0fa9d379d2ff.tar.xz |
Merge pull request #2248 from matrix-org/erikj/state_fixup
Faster cache for get_joined_hosts
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/typing.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/synapse/handlers/typing.py b/synapse/handlers/typing.py index 3b7818af5c..82dedbbc99 100644 --- a/synapse/handlers/typing.py +++ b/synapse/handlers/typing.py @@ -89,7 +89,7 @@ class TypingHandler(object): until = self._member_typing_until.get(member, None) if not until or until <= now: logger.info("Timing out typing for: %s", member.user_id) - preserve_fn(self._stopped_typing)(member) + self._stopped_typing(member) continue # Check if we need to resend a keep alive over federation for this @@ -147,7 +147,7 @@ class TypingHandler(object): # No point sending another notification defer.returnValue(None) - yield self._push_update( + self._push_update( member=member, typing=True, ) @@ -171,7 +171,7 @@ class TypingHandler(object): member = RoomMember(room_id=room_id, user_id=target_user_id) - yield self._stopped_typing(member) + self._stopped_typing(member) @defer.inlineCallbacks def user_left_room(self, user, room_id): @@ -180,7 +180,6 @@ class TypingHandler(object): member = RoomMember(room_id=room_id, user_id=user_id) yield self._stopped_typing(member) - @defer.inlineCallbacks def _stopped_typing(self, member): if member.user_id not in self._room_typing.get(member.room_id, set()): # No point @@ -189,16 +188,15 @@ class TypingHandler(object): self._member_typing_until.pop(member, None) self._member_last_federation_poke.pop(member, None) - yield self._push_update( + self._push_update( member=member, typing=False, ) - @defer.inlineCallbacks def _push_update(self, member, typing): if self.hs.is_mine_id(member.user_id): # Only send updates for changes to our own users. - yield self._push_remote(member, typing) + preserve_fn(self._push_remote)(member, typing) self._push_update_local( member=member, |