forked from MirrorHub/mautrix-whatsapp
Update base power level for poll votes
This commit is contained in:
parent
b8127f3545
commit
da0fb48eb2
1 changed files with 7 additions and 5 deletions
12
portal.go
12
portal.go
|
@ -1325,11 +1325,12 @@ func (portal *Portal) GetBasePowerLevels() *event.PowerLevelsEventContent {
|
|||
portal.MainIntent().UserID: 100,
|
||||
},
|
||||
Events: map[string]int{
|
||||
event.StateRoomName.Type: anyone,
|
||||
event.StateRoomAvatar.Type: anyone,
|
||||
event.StateTopic.Type: anyone,
|
||||
event.EventReaction.Type: anyone,
|
||||
event.EventRedaction.Type: anyone,
|
||||
event.StateRoomName.Type: anyone,
|
||||
event.StateRoomAvatar.Type: anyone,
|
||||
event.StateTopic.Type: anyone,
|
||||
event.EventReaction.Type: anyone,
|
||||
event.EventRedaction.Type: anyone,
|
||||
TypeMSC3381PollResponse.Type: anyone,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -1338,6 +1339,7 @@ func (portal *Portal) applyPowerLevelFixes(levels *event.PowerLevelsEventContent
|
|||
changed := false
|
||||
changed = levels.EnsureEventLevel(event.EventReaction, 0) || changed
|
||||
changed = levels.EnsureEventLevel(event.EventRedaction, 0) || changed
|
||||
changed = levels.EnsureEventLevel(TypeMSC3381PollResponse, 0) || changed
|
||||
return changed
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue