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 + [world readable] ); - if (MatrixClientPeg.get().isGuest() && !rooms[i].guest_can_join) { + // World Readable + if (rooms[i].world_readable) { shouldPeek = true; } } if (rooms[i].guest_can_join) { guestJoin = ( - Guests can join + [guests allowed] ); + // Guests can join + } + + perms = null; + if (guestRead || guestJoin) { + perms =
{guestRead} {guestJoin}
; } // rows.unshift( - { name } {guestRead} {guestJoin} + { name } { rooms[i].aliases[0] } { rooms[i].num_joined_members } - - { rooms[i].topic } + + {perms} { rooms[i].topic } ); diff --git a/src/skins/vector/css/matrix-react-sdk/views/rooms/RoomPreviewBar.css b/src/skins/vector/css/matrix-react-sdk/views/rooms/RoomPreviewBar.css index f68d70853..0e792409e 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/rooms/RoomPreviewBar.css +++ b/src/skins/vector/css/matrix-react-sdk/views/rooms/RoomPreviewBar.css @@ -22,6 +22,10 @@ limitations under the License. color: #a4a4a4; } +.mx_RoomPreviewBar_invite_text { + color: #454545; +} + .mx_RoomPreviewBar_join_text { color: #ff0064; }