From 7caab4d0865879e12d79035ff69697eb7db5fdcb Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Wed, 9 Nov 2022 15:04:00 +0100 Subject: [PATCH] chore: Follow up fix for request users in invite rooms --- lib/src/client.dart | 2 +- lib/src/room.dart | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/src/client.dart b/lib/src/client.dart index e1be6f8e..866700cc 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -2256,7 +2256,7 @@ class Client extends MatrixApi { Future> _getUserIdsInEncryptedRooms() async { final userIds = {}; for (final room in rooms) { - if (room.encrypted) { + if (room.encrypted && room.membership == Membership.join) { try { final userList = await room.requestParticipants(); for (final user in userList) { diff --git a/lib/src/room.dart b/lib/src/room.dart index 18dc4cd1..9bc0bff6 100644 --- a/lib/src/room.dart +++ b/lib/src/room.dart @@ -1460,11 +1460,8 @@ class Room { } // Do not request users from the server if we have already done it - // in this session, have a complete list locally or are not a joined - // member of this room. - if (_requestedParticipants || - participantListComplete || - membership != Membership.join) { + // in this session or have a complete list locally. + if (_requestedParticipants || participantListComplete) { return getParticipants(); }