From 0ef5cc891e7f35b0c2035eb2a9a8ed41268067db Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 14 Jun 2016 14:10:49 +0100 Subject: [PATCH] Add currentRoomId / Alias to getInitialState with docs --- src/components/structures/MatrixChat.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 494792d902..9899f66cc5 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -64,6 +64,13 @@ module.exports = React.createClass({ getInitialState: function() { var s = { + // If we are viewing a room by alias, this contains the alias + currentRoomAlias: null, + + // The ID of the room we're viewing. This is either populated directly + // in the case where we view a room by ID or by RoomView when it resolves + // what ID an alias points at. + currentRoomId: null, logged_in: !!(MatrixClientPeg.get() && MatrixClientPeg.get().credentials), collapse_lhs: false, collapse_rhs: false,