mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 19:45:05 +01:00
return user id for own avatar in call if member hasn't been found
This commit is contained in:
parent
ed5fdb8154
commit
1fab314dd5
@ -114,17 +114,12 @@ class OwnMemberViewModel extends ViewModel<Options> implements IStreamViewModel
|
|||||||
if (member) {
|
if (member) {
|
||||||
return avatarInitials(member.name);
|
return avatarInitials(member.name);
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return this.getOption("room").user.id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
get avatarColorNumber(): number {
|
get avatarColorNumber(): number {
|
||||||
const member = this.memberObservable?.get();
|
return getIdentifierColorNumber(this.getOption("room").user.id);
|
||||||
if (member) {
|
|
||||||
return getIdentifierColorNumber(member.userId);
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
avatarUrl(size: number): string | undefined {
|
avatarUrl(size: number): string | undefined {
|
||||||
@ -139,7 +134,7 @@ class OwnMemberViewModel extends ViewModel<Options> implements IStreamViewModel
|
|||||||
if (member) {
|
if (member) {
|
||||||
return member.name;
|
return member.name;
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return this.getOption("room").user.id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user