Add a sprinkling of logger.debug() into typing notification handler

This commit is contained in:
Paul "LeoNerd" Evans 2014-12-11 18:00:15 +00:00
parent 6e1531682b
commit 966c4b2b04

View File

@ -67,6 +67,10 @@ class TypingNotificationHandler(BaseHandler):
if target_user != auth_user: if target_user != auth_user:
raise AuthError(400, "Cannot set another user's typing state") raise AuthError(400, "Cannot set another user's typing state")
logger.debug(
"%s has started typing in %s", target_user.to_string(), room_id
)
until = self.clock.time_msec() + timeout until = self.clock.time_msec() + timeout
member = RoomMember(room_id=room_id, user=target_user) member = RoomMember(room_id=room_id, user=target_user)
@ -98,6 +102,10 @@ class TypingNotificationHandler(BaseHandler):
if target_user != auth_user: if target_user != auth_user:
raise AuthError(400, "Cannot set another user's typing state") raise AuthError(400, "Cannot set another user's typing state")
logger.debug(
"%s has stopped typing in %s", target_user.to_string(), room_id
)
member = RoomMember(room_id=room_id, user=target_user) member = RoomMember(room_id=room_id, user=target_user)
yield self._stopped_typing(member) yield self._stopped_typing(member)