mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-02 06:12:45 +00:00
Update onOldRoomEvent
This commit is contained in:
parent
0fbebecd41
commit
c1bc3df1e0
2 changed files with 20 additions and 10 deletions
|
@ -124,6 +124,21 @@ func (n *Notifier) OnNewEvent(
|
|||
}
|
||||
}
|
||||
|
||||
// OnOldEvent is called when the sync API receives an "old" event, e.g.
|
||||
// because it was pulled in by get_missing_events or similar. We need
|
||||
// to update the stream position, but we don't bother waking up any
|
||||
// clients because the event will be stored as excluded from sync anyway.
|
||||
func (n *Notifier) OnOldEvent(
|
||||
ev *gomatrixserverlib.HeaderedEvent, roomID string, userIDs []string,
|
||||
posUpdate types.StreamingToken,
|
||||
) {
|
||||
n.streamLock.Lock()
|
||||
defer n.streamLock.Unlock()
|
||||
|
||||
n.currPos.ApplyUpdates(posUpdate)
|
||||
n.removeEmptyUserStreams()
|
||||
}
|
||||
|
||||
func (n *Notifier) OnNewAccountData(
|
||||
userID string, posUpdate types.StreamingToken,
|
||||
) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue