From 8609b2b205c33d903e044d7ba4f1577dccbb8ab2 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Sat, 23 Sep 2023 10:20:53 -0400 Subject: [PATCH] Default PowerLevelContent.Invite to 0 per matrix spec 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] https://github.com/matrix-org/matrix-spec/commit/136b5c9231dde8f5b95f495e60b5d2315608a886 [2] https://github.com/matrix-org/synapse/blob/v1.92.3/synapse/handlers/event_auth.py#L138 Signed-off-by: Nick Cao --- eventcontent.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eventcontent.go b/eventcontent.go index 83eb787a..acd6e452 100644 --- a/eventcontent.go +++ b/eventcontent.go @@ -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