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(); }