Always update our in-memory ACLs, even for outliers

This commit is contained in:
Till Faelligen 2023-03-09 16:24:58 +01:00
parent 70322699ab
commit 53b653154a
No known key found for this signature in database
GPG key ID: ACCDC9606D472758

View file

@ -360,6 +360,12 @@ func (r *Inputer) processRoomEvent(
// doesn't have any associated state to store and we don't need to
// notify anyone about it.
if input.Kind == api.KindOutlier {
// if the event is an ACL, update our in-memory ACLs now, even if it is an outlier. This is
// going to happen on a restart of Dendrite anyway.
// ACL updates for non-outliers are handled in `ProduceRoomEvents`
if !isRejected && event.Type() == "m.room.server_acl" && event.StateKeyEquals("") {
r.ACLs.OnServerACLUpdate(event)
}
logger.WithField("rejected", isRejected).Debug("Stored outlier")
hooks.Run(hooks.KindNewEventPersisted, headered)
return nil