Contact Sync: Properly drop contacts with invalid ACIs

Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
automated-signal
2024-02-06 12:06:55 -06:00
committed by GitHub
parent 59bda2e0d6
commit 76d5be9acd

View File

@@ -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,