1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-07-28 17:02:01 +03:00

Sync room state when another device joins a room.

This commit is contained in:
Kegan Dougal
2015-06-23 10:18:13 +01:00
parent bc0e2ad504
commit ef77c6f989
2 changed files with 17 additions and 7 deletions

View File

@ -23,7 +23,7 @@ var rl = readline.createInterface({
terminal: false
});
rl.on('line', function(line) {
if (line.indexOf("/enter ") === 0 && !viewingRoom) {
if (line.indexOf("/join ") === 0 && !viewingRoom) {
var roomIndex = line.split(" ")[1];
viewingRoom = roomList[roomIndex];
if (viewingRoom.getMember(myUserId).membership === "invite") {
@ -103,7 +103,7 @@ function printHelp() {
console.log("Global commands:");
console.log(" '/help' : Show this help.");
console.log("Room list index commands:");
console.log(" '/enter <index>' Enter a room, e.g. '/enter 5'");
console.log(" '/join <index>' Join a room, e.g. '/join 5'");
console.log("Room commands:");
console.log(" '/exit' Return to the room list index.");
console.log(" '/members' Show the room member list.");