Skip to content

Commit

Permalink
Merge pull request #2 from tchapgouv/dm-all-admins
Browse files Browse the repository at this point in the history
Put all invitees as admin in case of DM creation
  • Loading branch information
MatMaul authored May 2, 2024
2 parents 0361b08 + ba04572 commit a0d040f
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 a0d040f

Please sign in to comment.