mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-12 01:13:10 -06:00
more comments
This commit is contained in:
parent
0768166cd7
commit
4ffc180c68
|
|
@ -78,21 +78,29 @@ func updateLatestEvents(
|
||||||
// The state could be passed using function arguments, but it becomes impractical
|
// The state could be passed using function arguments, but it becomes impractical
|
||||||
// when there are so many variables to pass around.
|
// when there are so many variables to pass around.
|
||||||
type latestEventsUpdater struct {
|
type latestEventsUpdater struct {
|
||||||
db RoomEventDatabase
|
db RoomEventDatabase
|
||||||
updater types.RoomRecentEventsUpdater
|
updater types.RoomRecentEventsUpdater
|
||||||
ow OutputRoomEventWriter
|
ow OutputRoomEventWriter
|
||||||
roomNID types.RoomNID
|
roomNID types.RoomNID
|
||||||
stateAtEvent types.StateAtEvent
|
stateAtEvent types.StateAtEvent
|
||||||
event gomatrixserverlib.Event
|
event gomatrixserverlib.Event
|
||||||
sendAsServer string
|
// Which server to send this event as.
|
||||||
lastEventIDSent string
|
sendAsServer string
|
||||||
latest []types.StateAtEventAndReference
|
// The eventID of the event that was processed before this one.
|
||||||
removed []types.StateEntry
|
lastEventIDSent string
|
||||||
added []types.StateEntry
|
// The latest events in the room after processing this event.
|
||||||
|
latest []types.StateAtEventAndReference
|
||||||
|
// The state entries removed from and added to the current state of the
|
||||||
|
// room as a result of processing this event. They are sorted lists.
|
||||||
|
removed []types.StateEntry
|
||||||
|
added []types.StateEntry
|
||||||
|
// The state entries that are removed and added to recover the state before
|
||||||
|
// the event being processed. They are sorted lists.
|
||||||
stateBeforeEventRemoves []types.StateEntry
|
stateBeforeEventRemoves []types.StateEntry
|
||||||
stateBeforeEventAdds []types.StateEntry
|
stateBeforeEventAdds []types.StateEntry
|
||||||
oldStateNID types.StateSnapshotNID
|
// The snapshots of current state before and after processing this event
|
||||||
newStateNID types.StateSnapshotNID
|
oldStateNID types.StateSnapshotNID
|
||||||
|
newStateNID types.StateSnapshotNID
|
||||||
}
|
}
|
||||||
|
|
||||||
func (u *latestEventsUpdater) doUpdateLatestEvents() error {
|
func (u *latestEventsUpdater) doUpdateLatestEvents() error {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue