diff options
author | Hugh Nimmo-Smith <hughns@element.io> | 2024-07-16 17:58:18 +0100 |
---|---|---|
committer | Hugh Nimmo-Smith <hughns@element.io> | 2024-07-17 10:47:16 +0100 |
commit | 8dea89837a58639350d43e3b5da54973061ad4dd (patch) | |
tree | 1db61793b8adb9926e7784e5b0a962e36eb71140 /synapse/rest/client/room.py | |
parent | 1.110.0 (diff) | |
download | synapse-8dea89837a58639350d43e3b5da54973061ad4dd.tar.xz |
Prototype of using m.typing to clean up MSC3401 call memberships github/hughns/msc3401-typing hughns/msc3401-typing
Only apply logic where io.element.type=org.matrix.msc3401.call.member on the typing PUT
Diffstat (limited to 'synapse/rest/client/room.py')
-rw-r--r-- | synapse/rest/client/room.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/synapse/rest/client/room.py b/synapse/rest/client/room.py index 903c74f6d8..33d6f05f69 100644 --- a/synapse/rest/client/room.py +++ b/synapse/rest/client/room.py @@ -1256,6 +1256,8 @@ class RoomTypingRestServlet(RestServlet): # Limit timeout to stop people from setting silly typing timeouts. timeout = min(content.get("timeout", 30000), 120000) + type = content.get("io.element.type", "m.typing") + # Defer getting the typing handler since it will raise on WORKER_PATTERNS. typing_handler = self.hs.get_typing_writer_handler() @@ -1266,10 +1268,14 @@ class RoomTypingRestServlet(RestServlet): requester=requester, room_id=room_id, timeout=timeout, + type=type, ) else: await typing_handler.stopped_typing( - target_user=target_user, requester=requester, room_id=room_id + target_user=target_user, + requester=requester, + room_id=room_id, + type=type, ) except ShadowBanError: # Pretend this worked without error. |