From 78ad890a2038fd0b4f84fada04ad1f1f32c3d651 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Mon, 25 Jul 2022 14:08:31 -0700 Subject: [PATCH] Conversation.getProps: Allow for our own ACI to be missing --- ts/models/conversations.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ts/models/conversations.ts b/ts/models/conversations.ts index 6fa92b2869b6..e411a9ed9b4b 100644 --- a/ts/models/conversations.ts +++ b/ts/models/conversations.ts @@ -1755,7 +1755,7 @@ export class ConversationModel extends window.Backbone const { customColor, customColorId } = this.getCustomColorData(); - const ourACI = window.textsecure.storage.user.getCheckedUuid(UUIDKind.ACI); + const ourACI = window.textsecure.storage.user.getUuid(UUIDKind.ACI); const ourPNI = window.textsecure.storage.user.getUuid(UUIDKind.PNI); // TODO: DESKTOP-720 @@ -1775,12 +1775,13 @@ export class ConversationModel extends window.Backbone // eslint-disable-next-line @typescript-eslint/no-non-null-assertion activeAt: this.get('active_at')!, areWePending: - this.isMemberPending(ourACI) || - Boolean( - ourPNI && !this.isMember(ourACI) && this.isMemberPending(ourPNI) - ), + ourACI && + (this.isMemberPending(ourACI) || + Boolean( + ourPNI && !this.isMember(ourACI) && this.isMemberPending(ourPNI) + )), areWePendingApproval: Boolean( - ourConversationId && this.isMemberAwaitingApproval(ourACI) + ourConversationId && ourACI && this.isMemberAwaitingApproval(ourACI) ), areWeAdmin: this.areWeAdmin(), avatars: getAvatarData(this.attributes),