summary refs log tree commit diff
path: root/synapse/rest/client/capabilities.py
diff options
context:
space:
mode:
authorDirk Klimpel <5740567+dklimpel@users.noreply.github.com>2021-08-19 11:40:40 +0200
committerGitHub <noreply@github.com>2021-08-19 09:40:40 +0000
commitb5fef6054a3d5763a031440ad4c56fc97b12d2aa (patch)
treef179b210a3f533acb0402049c5680f609507335d /synapse/rest/client/capabilities.py
parentRemove not needed database updates in modify user admin API (#10627) (diff)
downloadsynapse-b5fef6054a3d5763a031440ad4c56fc97b12d2aa.tar.xz
Support MSC3283: Expose `enable_set_displayname` in capabilities (#10452)
Diffstat (limited to 'synapse/rest/client/capabilities.py')
-rw-r--r--synapse/rest/client/capabilities.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/synapse/rest/client/capabilities.py b/synapse/rest/client/capabilities.py
index 88e3aac797..093549512e 100644
--- a/synapse/rest/client/capabilities.py
+++ b/synapse/rest/client/capabilities.py
@@ -61,6 +61,17 @@ class CapabilitiesRestServlet(RestServlet):
                 "org.matrix.msc3244.room_capabilities"
             ] = MSC3244_CAPABILITIES
 
+        if self.config.experimental.msc3283_enabled:
+            response["capabilities"]["org.matrix.msc3283.set_displayname"] = {
+                "enabled": self.config.enable_set_displayname
+            }
+            response["capabilities"]["org.matrix.msc3283.set_avatar_url"] = {
+                "enabled": self.config.enable_set_avatar_url
+            }
+            response["capabilities"]["org.matrix.msc3283.3pid_changes"] = {
+                "enabled": self.config.enable_3pid_changes
+            }
+
         return 200, response