mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 14:06:02 -04:00
Time out typing over federation
This commit is contained in:
parent
667fcd54e8
commit
22578545a0
6 changed files with 119 additions and 82 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue