From 431c93fc29f71254ca296a73827968ad0a83e8cd Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 22 Jul 2015 13:57:48 +0100 Subject: [PATCH] Fix invites so they display in room list --- src/controllers/organisms/RoomList.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/controllers/organisms/RoomList.js b/src/controllers/organisms/RoomList.js index 054e5f4e..42319706 100644 --- a/src/controllers/organisms/RoomList.js +++ b/src/controllers/organisms/RoomList.js @@ -98,10 +98,8 @@ module.exports = { getRoomList: function() { return RoomListSorter.mostRecentActivityFirst( MatrixClientPeg.get().getRooms().filter(function(room) { - return room.hasMembershipState( - MatrixClientPeg.get().credentials.userId, - "join" - ); + var member = room.getMember(MatrixClientPeg.get().credentials.userId); + return member && (member.membership == "join" || member.membership == "invite"); }) ); },