From c7d6e940ce94fa8fddad82bf271d56c65f7c12b4 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Wed, 27 Jan 2021 18:09:46 +1100 Subject: [PATCH] speed up loading of messages by removing db call to fetch our pubkey --- ts/session/utils/User.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ts/session/utils/User.ts b/ts/session/utils/User.ts index 8ff8e6142..cf00ad05d 100644 --- a/ts/session/utils/User.ts +++ b/ts/session/utils/User.ts @@ -28,12 +28,7 @@ export type HexKeyPair = { * Returns the public key of this current device as a string */ export async function getCurrentDevicePubKey(): Promise { - const item = await getItemById('number_id'); - if (!item || !item.value) { - return undefined; - } - - return item.value.split('.')[0]; + return window.textsecure.storage.user.getNumber(); } export async function getOurNumber(): Promise {