diff options
author | Mark Haines <mark.haines@matrix.org> | 2016-05-17 15:58:46 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2016-05-17 15:58:46 +0100 |
commit | 0cb441fedd77b42f307745a441b804fee6386cb5 (patch) | |
tree | 5b240661fd780a583871812dd606491c1b38683f /synapse/rest/client/v1/room.py | |
parent | Merge pull request #791 from matrix-org/markjh/app_service_config (diff) | |
download | synapse-0cb441fedd77b42f307745a441b804fee6386cb5.tar.xz |
Move typing handler out of the Handlers object
Diffstat (limited to 'synapse/rest/client/v1/room.py')
-rw-r--r-- | synapse/rest/client/v1/room.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/synapse/rest/client/v1/room.py b/synapse/rest/client/v1/room.py index 9c89442ce6..cf478c6f79 100644 --- a/synapse/rest/client/v1/room.py +++ b/synapse/rest/client/v1/room.py @@ -571,6 +571,7 @@ class RoomTypingRestServlet(ClientV1RestServlet): def __init__(self, hs): super(RoomTypingRestServlet, self).__init__(hs) self.presence_handler = hs.get_presence_handler() + self.typing_handler = hs.get_typing_handler() @defer.inlineCallbacks def on_PUT(self, request, room_id, user_id): @@ -581,19 +582,17 @@ class RoomTypingRestServlet(ClientV1RestServlet): content = parse_json_object_from_request(request) - typing_handler = self.handlers.typing_notification_handler - yield self.presence_handler.bump_presence_active_time(requester.user) if content["typing"]: - yield typing_handler.started_typing( + yield self.typing_handler.started_typing( target_user=target_user, auth_user=requester.user, room_id=room_id, timeout=content.get("timeout", 30000), ) else: - yield typing_handler.stopped_typing( + yield self.typing_handler.stopped_typing( target_user=target_user, auth_user=requester.user, room_id=room_id, |