mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-27 07:28:27 +00:00
Tweaks
This commit is contained in:
parent
ae3c4f3c56
commit
cc2f8a799b
1 changed files with 4 additions and 1 deletions
|
@ -168,6 +168,9 @@ func (r *Inputer) processRoomEvent(
|
||||||
|
|
||||||
missingPrev := len(missingRes.MissingPrevEventIDs) > 0
|
missingPrev := len(missingRes.MissingPrevEventIDs) > 0
|
||||||
if 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.
|
||||||
if len(serverRes.ServerNames) > 0 {
|
if len(serverRes.ServerNames) > 0 {
|
||||||
missingState := missingStateReq{
|
missingState := missingStateReq{
|
||||||
origin: input.Origin,
|
origin: input.Origin,
|
||||||
|
@ -228,7 +231,7 @@ func (r *Inputer) processRoomEvent(
|
||||||
// We haven't calculated a state for this event yet.
|
// We haven't calculated a state for this event yet.
|
||||||
// Lets calculate one.
|
// Lets calculate one.
|
||||||
err = r.calculateAndSetState(ctx, input, roomInfo, &stateAtEvent, event, isRejected)
|
err = r.calculateAndSetState(ctx, input, roomInfo, &stateAtEvent, event, isRejected)
|
||||||
if err != nil && input.Kind != api.KindOld {
|
if err != nil {
|
||||||
return fmt.Errorf("r.calculateAndSetState: %w", err)
|
return fmt.Errorf("r.calculateAndSetState: %w", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue