mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-23 14:53:10 -06:00
Sync API don't consume state events
This commit is contained in:
parent
c85da93dfd
commit
ec670487f6
|
|
@ -129,6 +129,11 @@ func (s *OutputRoomEventConsumer) onNewRoomEvent(
|
||||||
ctx context.Context, msg api.OutputNewRoomEvent,
|
ctx context.Context, msg api.OutputNewRoomEvent,
|
||||||
) error {
|
) error {
|
||||||
ev := msg.Event
|
ev := msg.Event
|
||||||
|
if msg.Type == api.OutputRoomState {
|
||||||
|
s.notifyKeyChanges(&ev)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
addsStateEvents := msg.AddsState()
|
addsStateEvents := msg.AddsState()
|
||||||
|
|
||||||
ev, err := s.updateStateEvent(ev)
|
ev, err := s.updateStateEvent(ev)
|
||||||
|
|
@ -150,7 +155,7 @@ func (s *OutputRoomEventConsumer) onNewRoomEvent(
|
||||||
msg.AddsStateEventIDs,
|
msg.AddsStateEventIDs,
|
||||||
msg.RemovesStateEventIDs,
|
msg.RemovesStateEventIDs,
|
||||||
msg.TransactionID,
|
msg.TransactionID,
|
||||||
msg.Type == api.OutputRoomState,
|
false,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// panic rather than continue with an inconsistent database
|
// panic rather than continue with an inconsistent database
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue