mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 14:25:53 +01:00
Don't update state store with historical events
This commit is contained in:
parent
e0ec08ac84
commit
010782c602
1 changed files with 5 additions and 1 deletions
|
|
@ -196,7 +196,11 @@ func (as *AppService) handleEvents(evts []*event.Event, defaultTypeClass event.T
|
|||
as.Log.Debugfln("Failed to parse content of %s (type %s): %v", evt.ID, evt.Type.Type, err)
|
||||
}
|
||||
if evt.Type.IsState() {
|
||||
as.UpdateState(evt)
|
||||
// TODO sending historical state events in AS transactions is probably a bug in synapse, this can be removed if/when that bug is fixed.
|
||||
historical, ok := evt.Content.Raw["org.matrix.msc2716.historical"].(bool)
|
||||
if !ok || !historical {
|
||||
as.UpdateState(evt)
|
||||
}
|
||||
}
|
||||
as.Events <- evt
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue