Peeking updates (#1607)

* Add unpeek

* Don't allow peeks into encrypted rooms

* Fix send tests

* Update consumers
This commit is contained in:
Neil Alexander 2020-12-03 11:11:46 +00:00 committed by GitHub
parent 2b03d24358
commit be7d8595be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 300 additions and 2 deletions

View file

@ -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,