From 9a283909b030795502c4e8c96fa303d7ccc72cf3 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Mon, 5 Feb 2024 18:30:04 -0800 Subject: [PATCH] Contact Sync: Properly drop contacts with invalid ACIs --- 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,