diff options
author | Jonathan de Jong <jonathan@automatia.nl> | 2022-03-23 13:47:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-23 12:47:07 +0000 |
commit | c5776780f0621eb9440277cfd9ffd41b1443f34e (patch) | |
tree | 30925eec6c819606fe4e5cb4a3b26ee56740bb1a /synapse | |
parent | Allow registering admin users using the module API (#12250) (diff) | |
download | synapse-c5776780f0621eb9440277cfd9ffd41b1443f34e.tar.xz |
Remove mutual_rooms `update_user_directory` check, and add extra documentation (#12038)
Resolves #10339
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/rest/client/mutual_rooms.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/synapse/rest/client/mutual_rooms.py b/synapse/rest/client/mutual_rooms.py index d3872a76c8..27bfaf0b29 100644 --- a/synapse/rest/client/mutual_rooms.py +++ b/synapse/rest/client/mutual_rooms.py @@ -42,17 +42,19 @@ class UserMutualRoomsServlet(RestServlet): super().__init__() self.auth = hs.get_auth() self.store = hs.get_datastores().main - self.user_directory_active = hs.config.server.update_user_directory + self.user_directory_search_enabled = ( + hs.config.userdirectory.user_directory_search_enabled + ) async def on_GET( self, request: SynapseRequest, user_id: str ) -> Tuple[int, JsonDict]: - if not self.user_directory_active: + if not self.user_directory_search_enabled: raise SynapseError( code=400, - msg="The user directory is disabled on this server. Cannot determine shared rooms.", - errcode=Codes.FORBIDDEN, + msg="User directory searching is disabled. Cannot determine shared rooms.", + errcode=Codes.UNKNOWN, ) UserID.from_string(user_id) |