From 76d5be9acdb37803eef56da3fee9e7a410355abb Mon Sep 17 00:00:00 2001 From: automated-signal <37887102+automated-signal@users.noreply.github.com> Date: Tue, 6 Feb 2024 12:06:55 -0600 Subject: [PATCH] Contact Sync: Properly drop contacts with invalid ACIs Co-authored-by: Scott Nonnenberg --- ts/textsecure/ContactsParser.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ts/textsecure/ContactsParser.ts b/ts/textsecure/ContactsParser.ts index d309bc0fe6..4b71f93e7c 100644 --- a/ts/textsecure/ContactsParser.ts +++ b/ts/textsecure/ContactsParser.ts @@ -188,10 +188,6 @@ function prepareContact( proto: Proto.ContactDetails, avatar?: ContactAvatarType ): ContactDetailsWithAvatar | undefined { - const aci = proto.aci - ? normalizeAci(proto.aci, 'ContactBuffer.aci') - : proto.aci; - const expireTimer = proto.expireTimer != null ? DurationInSeconds.fromSeconds(proto.expireTimer) @@ -204,6 +200,10 @@ function prepareContact( return undefined; } + const aci = proto.aci + ? normalizeAci(proto.aci, 'ContactBuffer.aci') + : proto.aci; + const result = { ...proto, expireTimer,