Browse Source

Update base power level for poll votes

Tulir Asokan 2 năm trước cách đây
mục cha
commit
da0fb48eb2
1 tập tin đã thay đổi với 7 bổ sung5 xóa
  1. 7 5
      portal.go

+ 7 - 5
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
 }