You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-28 05:03:59 +03:00
clarify that we only get joined members for now
This commit is contained in:
@@ -771,10 +771,16 @@ MatrixClient.prototype.loadRoomMembersIfNeeded = async function(roomId) {
|
|||||||
// room state at a given point in time. The plan is to do this by
|
// room state at a given point in time. The plan is to do this by
|
||||||
// passing the current next_batch sync token to the endpoint we use
|
// passing the current next_batch sync token to the endpoint we use
|
||||||
// to fetch the members. For now, this is a prototype that uses
|
// to fetch the members. For now, this is a prototype that uses
|
||||||
// the /joined_members api, which does not support this synchronization,
|
// the /joined_members api, which only tells us about the joined members
|
||||||
// so there is a race condition here between the current /sync call
|
// (not invites for example) and does not support this synchronization.
|
||||||
|
// So there is a race condition here between the current /sync call
|
||||||
// and the /joined_members call: if the have conflicting information, which one
|
// and the /joined_members call: if the have conflicting information, which one
|
||||||
// represents the most recent state?
|
// represents the most recent state?
|
||||||
|
//
|
||||||
|
// Addressing this race condition and the fact that this only tells us about
|
||||||
|
// joined members is a prerequisite for taking this out of the prototype stage and
|
||||||
|
// enabling the feature flag (feature_lazyloading) that
|
||||||
|
// the call to this method is behind.
|
||||||
const joinedMembersPromise = this.joinedMembers(roomId);
|
const joinedMembersPromise = this.joinedMembers(roomId);
|
||||||
const membersPromise = joinedMembersPromise.then((profiles) => {
|
const membersPromise = joinedMembersPromise.then((profiles) => {
|
||||||
return Object.entries(profiles.joined).map(([userId, profile]) => {
|
return Object.entries(profiles.joined).map(([userId, profile]) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user