You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-18 05:42:00 +03:00
Implement peek syncing.
This involves hitting room initial sync then /events?room_id=!thing:here It even works.
This commit is contained in:
@@ -1943,13 +1943,15 @@ MatrixClient.prototype.registerGuest = function(opts, callback) {
|
||||
* Peek into a room and receive updates about the room. This only works if the
|
||||
* history visibility for the room is world_readable.
|
||||
* @param {String} roomId The room to attempt to peek into.
|
||||
* @return {module:client.Promise} Resolves: Room object
|
||||
* @return {module:http-api.MatrixError} Rejects: with an error response.
|
||||
*/
|
||||
MatrixClient.prototype.peekInRoom = function(roomId) {
|
||||
if (this._peekSync) {
|
||||
this._peekSync.stopPeeking();
|
||||
}
|
||||
this._peekSync = new SyncApi(this);
|
||||
this._peekSync.peek(roomId);
|
||||
return this._peekSync.peek(roomId);
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user