From 73c702515b2aa1274ec02edce862dbc6926db91b Mon Sep 17 00:00:00 2001 From: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> Date: Mon, 13 Dec 2021 19:23:52 +0100 Subject: [PATCH] Remove unnecessary casts in conversations.ts --- ts/models/conversations.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ts/models/conversations.ts b/ts/models/conversations.ts index 243f9016c9..abc909658f 100644 --- a/ts/models/conversations.ts +++ b/ts/models/conversations.ts @@ -4616,8 +4616,7 @@ export class ConversationModel extends window.Backbone if (!encryptedName) { return; } - // isn't this already an Uint8Array? - const key = this.get('profileKey') as unknown as string; + const key = this.get('profileKey'); if (!key) { return; } @@ -4670,8 +4669,7 @@ export class ConversationModel extends window.Backbone } const avatar = await window.textsecure.messaging.getAvatar(avatarPath); - // isn't this already an Uint8Array? - const key = this.get('profileKey') as unknown as string; + const key = this.get('profileKey'); if (!key) { return; } @@ -4729,8 +4727,7 @@ export class ConversationModel extends window.Backbone } async deriveAccessKeyIfNeeded(): Promise { - // isn't this already an array buffer? - const profileKey = this.get('profileKey') as unknown as string; + const profileKey = this.get('profileKey'); if (!profileKey) { return; }