You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-11 20:22:36 +03:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -48,6 +48,9 @@ class FlairStore extends EventEmitter {
|
|||||||
// reject: () => {}
|
// reject: () => {}
|
||||||
// }
|
// }
|
||||||
};
|
};
|
||||||
|
this._usersInFlight = {
|
||||||
|
// This has the same schema as _usersPending
|
||||||
|
};
|
||||||
|
|
||||||
this._debounceTimeoutID = null;
|
this._debounceTimeoutID = null;
|
||||||
}
|
}
|
||||||
@@ -125,12 +128,16 @@ class FlairStore extends EventEmitter {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
// Propagate the same error to all usersInFlight
|
// Propagate the same error to all usersInFlight
|
||||||
Object.keys(this._usersInFlight).forEach((userId) => {
|
Object.keys(this._usersInFlight).forEach((userId) => {
|
||||||
|
// The promise should always exist for userId, but do a null-check anyway
|
||||||
|
if (!this._usersInFlight[userId]) return;
|
||||||
this._usersInFlight[userId].reject(err);
|
this._usersInFlight[userId].reject(err);
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const updatedUserGroups = resp.users;
|
const updatedUserGroups = resp.users;
|
||||||
Object.keys(this._usersInFlight).forEach((userId) => {
|
Object.keys(this._usersInFlight).forEach((userId) => {
|
||||||
|
// The promise should always exist for userId, but do a null-check anyway
|
||||||
|
if (!this._usersInFlight[userId]) return;
|
||||||
this._usersInFlight[userId].resolve(updatedUserGroups[userId] || []);
|
this._usersInFlight[userId].resolve(updatedUserGroups[userId] || []);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user