don't crash on missing room members
This commit is contained in:
parent
8f0cd4ffbc
commit
b68da579f0
1 changed files with 2 additions and 0 deletions
|
@ -72,6 +72,7 @@ export default class UserProvider extends AutocompleteProvider {
|
||||||
// updates from pagination will happen when the paginate completes.
|
// updates from pagination will happen when the paginate completes.
|
||||||
if (toStartOfTimeline || !data || !data.liveEvent) return;
|
if (toStartOfTimeline || !data || !data.liveEvent) return;
|
||||||
|
|
||||||
|
// TODO: lazyload if we have no ev.sender room member?
|
||||||
this.onUserSpoke(ev.sender);
|
this.onUserSpoke(ev.sender);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,6 +148,7 @@ export default class UserProvider extends AutocompleteProvider {
|
||||||
|
|
||||||
onUserSpoke(user: RoomMember) {
|
onUserSpoke(user: RoomMember) {
|
||||||
if (this.users === null) return;
|
if (this.users === null) return;
|
||||||
|
if (!user) return;
|
||||||
if (user.userId === MatrixClientPeg.get().credentials.userId) return;
|
if (user.userId === MatrixClientPeg.get().credentials.userId) return;
|
||||||
|
|
||||||
// Move the user that spoke to the front of the array
|
// Move the user that spoke to the front of the array
|
||||||
|
|
Loading…
Reference in a new issue