diff --git a/src/components/views/rooms/RoomList.js b/src/components/views/rooms/RoomList.js
index c329e3f2a0..167603ecfb 100644
--- a/src/components/views/rooms/RoomList.js
+++ b/src/components/views/rooms/RoomList.js
@@ -589,12 +589,12 @@ module.exports = React.createClass({
const GroupInviteTile = sdk.getComponent('groups.GroupInviteTile');
for (const group of MatrixClientPeg.get().getGroups()) {
- const {groupId: id, name, myMembership: membership} = group;
+ const {groupId, name, myMembership} = group;
// filter to only groups in invite state and group_id starts with filter or group name includes it
- if (membership !== 'invite') continue;
- if (lcFilter && !id.toLowerCase().startsWith(lcFilter) &&
+ if (myMembership !== 'invite') continue;
+ if (lcFilter && !groupId.toLowerCase().startsWith(lcFilter) &&
!(name && name.toLowerCase().includes(lcFilter))) continue;
- ret.push();
+ ret.push();
}
return ret;