diff --git a/lib/client.js b/lib/client.js index 3f46a29eb..d9f7fecba 100644 --- a/lib/client.js +++ b/lib/client.js @@ -2317,6 +2317,16 @@ MatrixClient.prototype.peekInRoom = function(roomId) { return this._peekSync.peek(roomId); }; +/** + * Stop any ongoing room peeking. + */ +MatrixClient.prototype.stopPeeking = function() { + if (this._peekSync) { + this._peekSync.stopPeeking(); + this._peekSync = null; + } +}; + /** * Set r/w flags for guest access in a room. * @param {string} roomId The room to configure guest access in.