Clean up a bit

This commit is contained in:
Neil Alexander 2022-02-07 14:28:28 +00:00
parent 29aa75b727
commit ab20cb0134
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 1 additions and 4 deletions

View file

@ -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.

View file

@ -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)
}