Skip to content

Commit

Permalink
Put all invitees as admin in case of DM creation
Browse files Browse the repository at this point in the history
  • Loading branch information
MatMaul committed Apr 3, 2024
1 parent b7b1a9b commit ba04572
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions room_access_rules/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,11 @@ async def on_create_room(
requester.user.to_string()
)

# This preset should put all invitees as admin, so do it
if preset == RoomCreationPreset.TRUSTED_PRIVATE_CHAT:
for invitee in config.get("invite", []):
default_power_levels["users"][invitee] = 100

# Check if the creator can override values for the power levels.
allowed = self._is_power_level_content_allowed(
config.get("power_level_content_override", {}),
Expand Down

0 comments on commit ba04572

Please sign in to comment.