mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 02:05:45 +03:00
hopefully fix bug186 by ensuring room members never have null users
This commit is contained in:
parent
05a3dab528
commit
fcf17adf14
1 changed files with 7 additions and 0 deletions
|
@ -246,6 +246,13 @@ module.exports = React.createClass({
|
|||
|
||||
// XXX: evil hack until SYJS-28 is fixed
|
||||
Object.keys(all_members).map(function(userId) {
|
||||
// work around a race where you might have a room member object
|
||||
// before the user object exists. This may or may not cause
|
||||
// https://github.com/vector-im/vector-web/issues/186
|
||||
if (all_members[userId].user === null) {
|
||||
all_members[userId].user = MatrixClientPeg.get().getUser(userId);
|
||||
}
|
||||
|
||||
if (all_members[userId].user && !all_members[userId].user.lastPresenceTs) {
|
||||
all_members[userId].user.lastPresenceTs = Date.now();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue