Use direct references for configuration variables (part 5). (#10897)

This commit is contained in:
Patrick Cloke 2021-09-24 07:25:21 -04:00 committed by GitHub
parent 85551b7a85
commit bb7fdd821b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
48 changed files with 128 additions and 113 deletions

View file

@ -692,10 +692,10 @@ class EventCreationHandler:
return False
async def _is_server_notices_room(self, room_id: str) -> bool:
if self.config.server_notices_mxid is None:
if self.config.servernotices.server_notices_mxid is None:
return False
user_ids = await self.store.get_users_in_room(room_id)
return self.config.server_notices_mxid in user_ids
return self.config.servernotices.server_notices_mxid in user_ids
async def assert_accepted_privacy_policy(self, requester: Requester) -> None:
"""Check if a user has accepted the privacy policy
@ -731,8 +731,8 @@ class EventCreationHandler:
# exempt the system notices user
if (
self.config.server_notices_mxid is not None
and user_id == self.config.server_notices_mxid
self.config.servernotices.server_notices_mxid is not None
and user_id == self.config.servernotices.server_notices_mxid
):
return