summary refs log tree commit diff
path: root/synapse/handlers/admin.py
diff options
context:
space:
mode:
authorEric Eastwood <erice@element.io>2022-09-30 20:24:39 -0500
committerEric Eastwood <erice@element.io>2022-09-30 20:24:39 -0500
commit4a495ac43b093eb5e223b64ab5bc033233ab83b9 (patch)
treea656afce9494d347c1cf960fe941e2d842ea2422 /synapse/handlers/admin.py
parentMerge branch 'develop' into madlittlemods/11850-migrate-to-opentelemetry (diff)
parentClarifications in user directory for users who share rooms tracking (#13966) (diff)
downloadsynapse-4a495ac43b093eb5e223b64ab5bc033233ab83b9.tar.xz
Merge branch 'develop' into madlittlemods/11850-migrate-to-opentelemetry
Conflicts:
	synapse/handlers/message.py
	synapse/logging/opentracing.py
Diffstat (limited to 'synapse/handlers/admin.py')
-rw-r--r--synapse/handlers/admin.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/handlers/admin.py b/synapse/handlers/admin.py
index cf9f19608a..f2989cc4a2 100644
--- a/synapse/handlers/admin.py
+++ b/synapse/handlers/admin.py
@@ -32,6 +32,7 @@ class AdminHandler:
         self.store = hs.get_datastores().main
         self._storage_controllers = hs.get_storage_controllers()
         self._state_storage_controller = self._storage_controllers.state
+        self._msc3866_enabled = hs.config.experimental.msc3866.enabled
 
     async def get_whois(self, user: UserID) -> JsonDict:
         connections = []
@@ -75,6 +76,10 @@ class AdminHandler:
             "is_guest",
         }
 
+        if self._msc3866_enabled:
+            # Only include the approved flag if support for MSC3866 is enabled.
+            user_info_to_return.add("approved")
+
         # Restrict returned keys to a known set.
         user_info_dict = {
             key: value