Merge branch 'krille/do-not-request-users-invite-rooms' into 'main'
fix: Do not request users in not joined rooms See merge request famedly/company/frontend/famedlysdk!1159
This commit is contained in:
commit
79378714b9
|
|
@ -1458,9 +1458,16 @@ class Room {
|
|||
setState(user);
|
||||
}
|
||||
}
|
||||
if (_requestedParticipants || participantListComplete) {
|
||||
|
||||
// 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) {
|
||||
return getParticipants();
|
||||
}
|
||||
|
||||
final matrixEvents = await client.getMembersByRoom(id);
|
||||
final users = matrixEvents
|
||||
?.map((e) => Event.fromMatrixEvent(e, this).asUser)
|
||||
|
|
|
|||
Loading…
Reference in New Issue