mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-08-20 21:28:00 +01:00
Follow-up fixes for e164-less linking
This commit is contained in:
+2
-2
@@ -1367,9 +1367,9 @@ async function showAbout() {
|
||||
|
||||
async function getIsLinked() {
|
||||
try {
|
||||
const number = await sql.sqlRead('getItemById', 'number_id');
|
||||
const aci = await sql.sqlRead('getItemById', 'uuid_id');
|
||||
const password = await sql.sqlRead('getItemById', 'password');
|
||||
return Boolean(number && password);
|
||||
return Boolean(aci && password);
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1015,8 +1015,8 @@ export type GetSenderCertificateResultType = Readonly<{ certificate: string }>;
|
||||
|
||||
const whoamiResultZod = z.object({
|
||||
uuid: z.string(),
|
||||
pni: untaggedPniSchema,
|
||||
number: z.string(),
|
||||
pni: untaggedPniSchema.nullish(),
|
||||
number: z.string().nullish(),
|
||||
usernameHash: z.string().nullish(),
|
||||
usernameLinkHandle: z.string().nullish(),
|
||||
});
|
||||
|
||||
@@ -17,6 +17,12 @@ export async function checkOurPniIdentityKey(): Promise<void> {
|
||||
}
|
||||
|
||||
const { pni: remotePni } = await whoami();
|
||||
if (remotePni == null) {
|
||||
log.warn(`remote pni absent, local is ${ourPni}`);
|
||||
window.Whisper.events.emit('unlinkAndDisconnect');
|
||||
return;
|
||||
}
|
||||
|
||||
if (toTaggedPni(remotePni) !== ourPni) {
|
||||
log.warn(`remote pni mismatch, ${remotePni} != ${ourPni}`);
|
||||
window.Whisper.events.emit('unlinkAndDisconnect');
|
||||
|
||||
Reference in New Issue
Block a user