From 1fab314dd51c4b7356d047a07bdd04bd3d35ad44 Mon Sep 17 00:00:00 2001 From: Bruno Windels <274386+bwindels@users.noreply.github.com> Date: Fri, 3 Jun 2022 15:49:45 +0200 Subject: [PATCH] return user id for own avatar in call if member hasn't been found --- src/domain/session/room/CallViewModel.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/domain/session/room/CallViewModel.ts b/src/domain/session/room/CallViewModel.ts index 265648bf..cd974605 100644 --- a/src/domain/session/room/CallViewModel.ts +++ b/src/domain/session/room/CallViewModel.ts @@ -114,17 +114,12 @@ class OwnMemberViewModel extends ViewModel implements IStreamViewModel if (member) { return avatarInitials(member.name); } else { - return ""; + return this.getOption("room").user.id; } } get avatarColorNumber(): number { - const member = this.memberObservable?.get(); - if (member) { - return getIdentifierColorNumber(member.userId); - } else { - return 0; - } + return getIdentifierColorNumber(this.getOption("room").user.id); } avatarUrl(size: number): string | undefined { @@ -139,7 +134,7 @@ class OwnMemberViewModel extends ViewModel implements IStreamViewModel if (member) { return member.name; } else { - return ""; + return this.getOption("room").user.id; } }