diff options
author | Paul "LeoNerd" Evans <paul@matrix.org> | 2015-01-12 18:22:00 +0000 |
---|---|---|
committer | Paul "LeoNerd" Evans <paul@matrix.org> | 2015-01-12 18:22:00 +0000 |
commit | 67d8305aea65d52abe4ce1c40bf78fdab3dc6471 (patch) | |
tree | 6fd6d59b93de92f181cce7a245a5bfe547d2b3c3 | |
parent | Don't make @unittest.DEBUG print the huge amount of verbosity generated by th... (diff) | |
download | synapse-67d8305aea65d52abe4ce1c40bf78fdab3dc6471.tar.xz |
Make typing notification timeouts print a (debug) logging message
-rw-r--r-- | synapse/handlers/typing.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/synapse/handlers/typing.py b/synapse/handlers/typing.py index ab698b36e1..15039ff0da 100644 --- a/synapse/handlers/typing.py +++ b/synapse/handlers/typing.py @@ -83,9 +83,15 @@ class TypingNotificationHandler(BaseHandler): if member in self._member_typing_timer: self.clock.cancel_call_later(self._member_typing_timer[member]) + def _cb(): + logger.debug( + "%s has timed out in %s", target_user.to_string(), room_id + ) + self._stopped_typing(member) + self._member_typing_until[member] = until self._member_typing_timer[member] = self.clock.call_later( - timeout / 1000, lambda: self._stopped_typing(member) + timeout / 1000, _cb ) if was_present: |