From 7379b02b703ff6cd56a0eb806aeb5249b09232c0 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Tue, 24 May 2022 10:10:25 +0100 Subject: [PATCH] Give PL100 to invited users in `trusted_private_chat` preset (#2485) --- clientapi/routing/createroom.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clientapi/routing/createroom.go b/clientapi/routing/createroom.go index d40d84a79..3f92b7ba6 100644 --- a/clientapi/routing/createroom.go +++ b/clientapi/routing/createroom.go @@ -245,7 +245,9 @@ func createRoom( case presetTrustedPrivateChat: joinRuleContent.JoinRule = gomatrixserverlib.Invite historyVisibilityContent.HistoryVisibility = historyVisibilityShared - // TODO If trusted_private_chat, all invitees are given the same power level as the room creator. + for _, invitee := range r.Invite { + powerLevelContent.Users[invitee] = 100 + } case presetPublicChat: joinRuleContent.JoinRule = gomatrixserverlib.Public historyVisibilityContent.HistoryVisibility = historyVisibilityShared