aboutsummaryrefslogtreecommitdiff
path: root/syncapi/sync/notifier.go
diff options
context:
space:
mode:
Diffstat (limited to 'syncapi/sync/notifier.go')
-rw-r--r--syncapi/sync/notifier.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/syncapi/sync/notifier.go b/syncapi/sync/notifier.go
index daa3a1d8..1d8cd624 100644
--- a/syncapi/sync/notifier.go
+++ b/syncapi/sync/notifier.go
@@ -137,6 +137,18 @@ func (n *Notifier) OnNewPeek(
// by calling OnNewEvent.
}
+func (n *Notifier) OnRetirePeek(
+ roomID, userID, deviceID string,
+) {
+ n.streamLock.Lock()
+ defer n.streamLock.Unlock()
+
+ n.removePeekingDevice(roomID, userID, deviceID)
+
+ // we don't wake up devices here given the roomserver consumer will do this shortly afterwards
+ // by calling OnRetireEvent.
+}
+
func (n *Notifier) OnNewSendToDevice(
userID string, deviceIDs []string,
posUpdate types.StreamingToken,