Skip to content
This repository has been archived by the owner on May 16, 2019. It is now read-only.

Commit

Permalink
Don't explode if we don't have membership events
Browse files Browse the repository at this point in the history
To counteract the behaviour currently being demonstrated in matrix-org/synapse#2970
  • Loading branch information
turt2live committed Mar 15, 2018
1 parent 5a9325f commit 679d546
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/models/matrix/dto/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ export class User {

public static getDisambiguatedName(userId: string, roomMembers: RoomMemberEvent[], usePrevious = false): string {
const us = roomMembers.find(e => e.state_key === userId);
if (!us) throw new Error("Cannot find membership event for " + userId);
if (!us) {
//console.warn(new Error("Cannot find membership event for " + userId));
return userId;
}

let ourDisplayName = null;
if (usePrevious) {
Expand Down

0 comments on commit 679d546

Please sign in to comment.