Skip to content

Commit

Permalink
Default PowerLevelContent.Invite to 0 per matrix spec
Browse files Browse the repository at this point in the history
The default power level for invite was wrong in matrix spec v1.1[1],
and has been fixed in v1.3, bringing us in line with synase[2].

[1] matrix-org/matrix-spec@136b5c9
[2] https://github.com/matrix-org/synapse/blob/v1.92.3/synapse/handlers/event_auth.py#L138

Signed-off-by: Nick Cao <nickcao@nichi.co>
  • Loading branch information
NickCao committed Sep 23, 2023
1 parent 0466775 commit 8609b2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eventcontent.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,9 +429,9 @@ func NewPowerLevelContentFromAuthEvents(authEvents AuthEventProvider, creatorUse
}

// Defaults sets the power levels to their default values.
// See https://spec.matrix.org/v1.1/client-server-api/#mroompower_levels for defaults.
// See https://spec.matrix.org/v1.8/client-server-api/#mroompower_levels for defaults.
func (c *PowerLevelContent) Defaults() {
c.Invite = 50
c.Invite = 0
c.Ban = 50
c.Kick = 50
c.Redact = 50
Expand Down

0 comments on commit 8609b2b

Please sign in to comment.