fix: Do not request users in not joined rooms
This commit is contained in:
parent
70af77b3ac
commit
f8140866ae
|
|
@ -1458,9 +1458,16 @@ class Room {
|
||||||
setState(user);
|
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();
|
return getParticipants();
|
||||||
}
|
}
|
||||||
|
|
||||||
final matrixEvents = await client.getMembersByRoom(id);
|
final matrixEvents = await client.getMembersByRoom(id);
|
||||||
final users = matrixEvents
|
final users = matrixEvents
|
||||||
?.map((e) => Event.fromMatrixEvent(e, this).asUser)
|
?.map((e) => Event.fromMatrixEvent(e, this).asUser)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue