From 8a77b29d17206463f0c45cc0f7f0c6243e6794d2 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 2 Feb 2016 16:30:28 +0000 Subject: [PATCH] Add docs to getRoom noting how you shouldn't assume it will return something because you've got a Room-like event --- lib/client.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/client.js b/lib/client.js index 4892eb239..b7a4d7f09 100644 --- a/lib/client.js +++ b/lib/client.js @@ -592,6 +592,9 @@ MatrixClient.prototype.isRoomEncrypted = function(roomId) { /** * Get the room for the given room ID. + * This function will return a valid room for any room for which a Room event + * has been emitted. Note in particular that other events, eg. RoomState.members + * will be emitted for a room before this function will return the given room. * @param {string} roomId The room ID * @return {Room} The Room or null if it doesn't exist or there is no data store. */