mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-01 03:03:10 -06:00
Clean up a bit
This commit is contained in:
parent
29aa75b727
commit
ab20cb0134
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue