From ab20cb0134350676d58d838da6978b7d700d8645 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Mon, 7 Feb 2022 14:28:28 +0000 Subject: [PATCH] Clean up a bit --- roomserver/internal/input/input_events.go | 2 +- roomserver/internal/query/query.go | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/roomserver/internal/input/input_events.go b/roomserver/internal/input/input_events.go index a8354f315..987b3cc42 100644 --- a/roomserver/internal/input/input_events.go +++ b/roomserver/internal/input/input_events.go @@ -221,7 +221,7 @@ func (r *Inputer) processRoomEvent( // typical federated room join) then we won't bother trying to fetch prev events // because we may not be allowed to see them and we have no choice but to trust // the state event IDs provided to us in the join instead. - if !input.HasState && missingPrev && input.Kind == api.KindNew { + if missingPrev && input.Kind == api.KindNew { // Don't do this for KindOld events, otherwise old events that we fetch // to satisfy missing prev events/state will end up recursively calling // processRoomEvent. diff --git a/roomserver/internal/query/query.go b/roomserver/internal/query/query.go index 98a9c9e73..845533032 100644 --- a/roomserver/internal/query/query.go +++ b/roomserver/internal/query/query.go @@ -150,9 +150,6 @@ func (r *Queryer) QueryMissingAuthPrevEvents( for _, prevEventID := range request.PrevEventIDs { state, err := r.DB.StateAtEventIDs(ctx, []string{prevEventID}) - if len(state) == 1 && state[0].IsRejected { - continue - } if err != nil || len(state) == 0 { response.MissingPrevEventIDs = append(response.MissingPrevEventIDs, prevEventID) }