Be more lenient to misplaced pni in conversations

This commit is contained in:
Fedor Indutny 2025-05-22 11:59:12 -07:00 committed by GitHub
commit 8d8e0329cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1032,11 +1032,13 @@ export class BackupExportStream extends Readable {
const { nicknameGivenName, nicknameFamilyName, note } = convo; const { nicknameGivenName, nicknameFamilyName, note } = convo;
const maybePni = convo.pni ?? convo.serviceId;
const aci = isAciString(convo.serviceId) const aci = isAciString(convo.serviceId)
? Aci.parseFromServiceIdString(convo.serviceId).getRawUuidBytes() ? Aci.parseFromServiceIdString(convo.serviceId).getRawUuidBytes()
: null; : null;
const pni = isPniString(convo.pni) const pni = isPniString(maybePni)
? Pni.parseFromServiceIdString(convo.pni).getRawUuidBytes() ? Pni.parseFromServiceIdString(maybePni).getRawUuidBytes()
: null; : null;
const e164 = convo.e164 ? Long.fromString(convo.e164) : null; const e164 = convo.e164 ? Long.fromString(convo.e164) : null;