Sync API don't consume state events

This commit is contained in:
Neil Alexander 2020-09-09 17:36:14 +01:00
parent c85da93dfd
commit ec670487f6
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -129,6 +129,11 @@ func (s *OutputRoomEventConsumer) onNewRoomEvent(
ctx context.Context, msg api.OutputNewRoomEvent,
) error {
ev := msg.Event
if msg.Type == api.OutputRoomState {
s.notifyKeyChanges(&ev)
return nil
}
addsStateEvents := msg.AddsState()
ev, err := s.updateStateEvent(ev)
@ -150,7 +155,7 @@ func (s *OutputRoomEventConsumer) onNewRoomEvent(
msg.AddsStateEventIDs,
msg.RemovesStateEventIDs,
msg.TransactionID,
msg.Type == api.OutputRoomState,
false,
)
if err != nil {
// panic rather than continue with an inconsistent database