Merge pull request #410 from vector-im/invite-avatar-fix

Fix error on invites in room list panel.
This commit is contained in:
Bruno Windels 2021-07-18 11:14:54 +00:00 committed by GitHub
commit 934e7e6f71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -58,7 +58,7 @@ export class Invite extends EventEmitter {
/** @see BaseRoom.avatarColorId */
get avatarColorId() {
return this._inviteData.avatarColorId;
return this._inviteData.avatarColorId || this.id;
}
get timestamp() {
@ -180,7 +180,7 @@ export class Invite extends EventEmitter {
_createData(inviteState, myInvite, inviter, summaryData, heroes) {
const name = heroes ? heroes.roomName : summaryData.name;
const avatarUrl = heroes ? heroes.roomAvatarUrl : summaryData.avatarUrl;
const avatarColorId = heroes ? heroes.roomAvatarColorId : this.id;
const avatarColorId = heroes?.roomAvatarColorId || this.id;
return {
roomId: this.id,
isEncrypted: !!summaryData.encryption,