|
|
@ -28,12 +28,7 @@ export type HexKeyPair = {
|
|
|
|
* Returns the public key of this current device as a string
|
|
|
|
* Returns the public key of this current device as a string
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
export async function getCurrentDevicePubKey(): Promise<string | undefined> {
|
|
|
|
export async function getCurrentDevicePubKey(): Promise<string | undefined> {
|
|
|
|
const item = await getItemById('number_id');
|
|
|
|
return window.textsecure.storage.user.getNumber();
|
|
|
|
if (!item || !item.value) {
|
|
|
|
|
|
|
|
return undefined;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return item.value.split('.')[0];
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export async function getOurNumber(): Promise<PubKey> {
|
|
|
|
export async function getOurNumber(): Promise<PubKey> {
|
|
|
|