diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2021-09-06 12:17:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-06 12:17:16 +0100 |
commit | 56e2a306348e10b2abfa4a615ebf9c6d43177f6e (patch) | |
tree | 0d585f037370ead78fdd120e19579d3a562301b5 /synapse/handlers/room.py | |
parent | Pull out encrypted_by_default tests from user_directory tests (#10752) (diff) | |
download | synapse-56e2a306348e10b2abfa4a615ebf9c6d43177f6e.tar.xz |
Move `maybe_kick_guest_users` out of `BaseHandler` (#10744)
This is part of my ongoing war against BaseHandler. I've moved kick_guest_users into RoomMemberHandler (since it calls out to that handler anyway), and split maybe_kick_guest_users into the two places it is called.
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r-- | synapse/handlers/room.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index ed780bb41f..0235fd09b4 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -25,7 +25,9 @@ from collections import OrderedDict from typing import TYPE_CHECKING, Any, Awaitable, Dict, List, Optional, Tuple from synapse.api.constants import ( + EventContentFields, EventTypes, + GuestAccess, HistoryVisibility, JoinRules, Membership, @@ -993,7 +995,8 @@ class RoomCreationHandler(BaseHandler): if config["guest_can_join"]: if (EventTypes.GuestAccess, "") not in initial_state: last_sent_stream_id = await send( - etype=EventTypes.GuestAccess, content={"guest_access": "can_join"} + etype=EventTypes.GuestAccess, + content={EventContentFields.GUEST_ACCESS: GuestAccess.CAN_JOIN}, ) for (etype, state_key), content in initial_state.items(): |