summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-05-23 15:28:23 +0100
committerRichard van der Hoff <richard@matrix.org>2018-05-23 15:28:23 +0100
commit3ff6f50eac86b063706f68387d3cf3e96a79a541 (patch)
treed9fb7acbdb74043a9a65b8b95bfe73911b209892 /synapse
parentstyle (diff)
downloadsynapse-3ff6f50eac86b063706f68387d3cf3e96a79a541.tar.xz
Use the localpart in the consent uri
... because it's shorter.
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/message.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index c3adbc6c95..7936a60af4 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -574,7 +574,9 @@ class EventCreationHandler(object):
         if u["consent_version"] == self.config.user_consent_version:
             return
 
-        consent_uri = self._consent_uri_builder.build_user_consent_uri(user_id)
+        consent_uri = self._consent_uri_builder.build_user_consent_uri(
+            requester.user.localpart,
+        )
         raise ConsentNotGivenError(
             msg=self.config.block_events_without_consent_error,
             consent_uri=consent_uri,