Skip to content

Commit 7a73c05

Browse files
authored
Override fix for v12 rooms (#458)
c.f element-hq/dendrite#3623
1 parent d6bb4bd commit 7a73c05

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

eventauth.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,12 +375,13 @@ func (a *allowerContext) userPowerLevel(userID spec.SenderID) int64 {
375375
}
376376
if a.powerLevelsEvent == nil {
377377
if userID == a.createEvent.SenderID() {
378-
return 100
378+
// FIXME: this is awful but needs to match up with NewPowerLevelContentFromAuthEvents in eventcontent.go
379+
// else you won't be able to override PLs when creating rooms.
380+
return CreatorPowerLevel - 1
379381
}
380382
return 0
381383
}
382384
return a.powerLevels.UserLevel(userID)
383-
384385
}
385386

386387
// update updates the auth event provider with new event contents.

0 commit comments

Comments
 (0)