0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-11-13 05:11:12 +01:00

Move SetLatestEvents

This commit is contained in:
Till Faelligen 2023-11-24 08:11:50 +01:00
parent 7db3e9f689
commit 94960c507a
No known key found for this signature in database
GPG key ID: 3DF82D8AB9211D4E

View file

@ -107,6 +107,10 @@ func (r *Inputer) updateLatestEvents(
}
}
if err = u.updater.SetLatestEvents(roomInfo.RoomNID, u.latest, u.stateAtEvent.EventNID, u.newStateNID); err != nil {
return fmt.Errorf("u.updater.SetLatestEvents: %w", err)
}
succeeded = true
return nil
}
@ -189,10 +193,6 @@ func (u *latestEventsUpdater) doUpdateLatestEvents(ctx context.Context, roomInfo
u.newStateNID = u.oldStateNID
}
if err = u.updater.SetLatestEvents(roomInfo.RoomNID, u.latest, u.stateAtEvent.EventNID, u.newStateNID); err != nil {
return nil, fmt.Errorf("u.updater.SetLatestEvents: %w", err)
}
return membershipUpdates, nil
}