diff --git a/SignalServiceKit/src/Contacts/SignalServiceAddress.swift b/SignalServiceKit/src/Contacts/SignalServiceAddress.swift index d83d4e35ee..c4588f4324 100644 --- a/SignalServiceKit/src/Contacts/SignalServiceAddress.swift +++ b/SignalServiceKit/src/Contacts/SignalServiceAddress.swift @@ -60,7 +60,16 @@ public class SignalServiceAddress: NSObject { return false } - return otherAddress.uuid == uuid || otherAddress.phoneNumber == phoneNumber + if let otherUuid = otherAddress.uuid, let thisUuid = uuid { + return otherUuid == thisUuid + } + + if let otherPhone = otherAddress.phoneNumber, let thisPhone = phoneNumber { + return otherPhone == thisPhone + } + + owsFailDebug("otherAddress had neither uuid nor phone") + return false } @objc