summary refs log tree commit diff
path: root/synapse/rest/client
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2021-02-19 13:20:34 -0500
committerGitHub <noreply@github.com>2021-02-19 13:20:34 -0500
commitfc8b3d88097d2c985e8eae9779cdb4b23e1a8ef6 (patch)
treef92ea6fbe63e71f2fc4e01abbb814f129be333b0 /synapse/rest/client
parentRegenerate exact thumbnails if missing (#9438) (diff)
downloadsynapse-fc8b3d88097d2c985e8eae9779cdb4b23e1a8ef6.tar.xz
Ratelimit cross-user key sharing requests. (#8957)
Diffstat (limited to 'synapse/rest/client')
-rw-r--r--synapse/rest/client/v2_alpha/sendtodevice.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/synapse/rest/client/v2_alpha/sendtodevice.py b/synapse/rest/client/v2_alpha/sendtodevice.py
index a3dee14ed4..79c1b526ee 100644
--- a/synapse/rest/client/v2_alpha/sendtodevice.py
+++ b/synapse/rest/client/v2_alpha/sendtodevice.py
@@ -56,10 +56,8 @@ class SendToDeviceRestServlet(servlet.RestServlet):
         content = parse_json_object_from_request(request)
         assert_params_in_dict(content, ("messages",))
 
-        sender_user_id = requester.user.to_string()
-
         await self.device_message_handler.send_device_message(
-            sender_user_id, message_type, content["messages"]
+            requester, message_type, content["messages"]
         )
 
         response = (200, {})  # type: Tuple[int, dict]