diff options
author | Erik Johnston <erik@matrix.org> | 2016-10-11 14:08:29 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-10-11 14:08:29 +0100 |
commit | 3061dac53eef21110d8d9f08554f28c562175a18 (patch) | |
tree | 51a8cb5ed3f294887bdcc2d6ef36efcad186af07 /synapse/rest/client/v1/room.py | |
parent | Fix check of wrong variable (diff) | |
parent | Merge pull request #1166 from matrix-org/rav/grandfather_broken_riot_signup (diff) | |
download | synapse-3061dac53eef21110d8d9f08554f28c562175a18.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/replication_noop
Diffstat (limited to 'synapse/rest/client/v1/room.py')
-rw-r--r-- | synapse/rest/client/v1/room.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/rest/client/v1/room.py b/synapse/rest/client/v1/room.py index 20889e4af0..010fbc7c32 100644 --- a/synapse/rest/client/v1/room.py +++ b/synapse/rest/client/v1/room.py @@ -705,12 +705,15 @@ class RoomTypingRestServlet(ClientV1RestServlet): yield self.presence_handler.bump_presence_active_time(requester.user) + # Limit timeout to stop people from setting silly typing timeouts. + timeout = min(content.get("timeout", 30000), 120000) + if content["typing"]: yield self.typing_handler.started_typing( target_user=target_user, auth_user=requester.user, room_id=room_id, - timeout=content.get("timeout", 30000), + timeout=timeout, ) else: yield self.typing_handler.stopped_typing( |