Set verified attribute on import

This commit is contained in:
Fedor Indutny 2024-12-18 09:40:17 -08:00 committed by GitHub
parent 1f693be9fc
commit d4b0ae25c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -856,14 +856,16 @@ export class BackupImportStream extends Writable {
}; };
if (serviceId != null && Bytes.isNotEmpty(contact.identityKey)) { if (serviceId != null && Bytes.isNotEmpty(contact.identityKey)) {
const verified = contact.identityState || 0;
this.identityKeys.set(serviceId, { this.identityKeys.set(serviceId, {
id: serviceId, id: serviceId,
publicKey: contact.identityKey, publicKey: contact.identityKey,
verified: contact.identityState || 0, verified,
firstUse: true, firstUse: true,
timestamp: this.now, timestamp: this.now,
nonblockingApproval: true, nonblockingApproval: true,
}); });
attrs.verified = verified;
} }
if (contact.notRegistered) { if (contact.notRegistered) {