diff --git a/src/components/structures/RoomDirectory.js b/src/components/structures/RoomDirectory.js index ea2a7237d..d528145ea 100644 --- a/src/components/structures/RoomDirectory.js +++ b/src/components/structures/RoomDirectory.js @@ -72,6 +72,7 @@ module.exports = React.createClass({ joinOrPeekPromise.done(function() { dis.dispatch({ action: 'view_room', + auto_peek: false, // don't peek as we've already peeked here (if it was needed) room_id: roomId }); }, function(err) { @@ -97,7 +98,7 @@ module.exports = React.createClass({ }); var rows = []; var self = this; - var guestRead, guestJoin; + var guestRead, guestJoin, perms; for (var i = 0; i < rooms.length; i++) { var name = rooms[i].name || rooms[i].aliases[0]; guestRead = null; @@ -106,30 +107,37 @@ module.exports = React.createClass({ if (rooms[i].world_readable) { guestRead = ( - + [world readable] ); - if (MatrixClientPeg.get().isGuest() && !rooms[i].guest_can_join) { + // + if (rooms[i].world_readable) { shouldPeek = true; } } if (rooms[i].guest_can_join) { guestJoin = ( - + [guests allowed] ); + // + } + + perms = null; + if (guestRead || guestJoin) { + perms =