From 1e8c7d63b85a8c6f3c0be85bc13d3fa3308bb79e Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Mon, 2 Jul 2018 10:22:29 -0600 Subject: [PATCH] clarify sync logging --- SignalServiceKit/src/Messages/OWSMessageSender.m | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/SignalServiceKit/src/Messages/OWSMessageSender.m b/SignalServiceKit/src/Messages/OWSMessageSender.m index a41a90c2d..5a4ab31a5 100644 --- a/SignalServiceKit/src/Messages/OWSMessageSender.m +++ b/SignalServiceKit/src/Messages/OWSMessageSender.m @@ -949,15 +949,13 @@ NSString *const OWSMessageSenderRateLimitedException = @"RateLimitedException"; }); return; - } else if (mayHaveLinkedDevices) { + } else if (mayHaveLinkedDevices && !hasDeviceMessages) { // We may have just linked a new secondary device which is not yet reflected in // the SignalRecipient that corresponds to ourself. Proceed. Client should learn // of new secondary devices via 409 "Mismatched devices" response. - DDLogWarn(@"%@ sync message has no device messages but account has secondary devices.", self.logTag); - } else if (hasDeviceMessages) { + DDLogWarn(@"%@ account has secondary devices, but sync message has no device messages", self.logTag); + } else if (!mayHaveLinkedDevices && hasDeviceMessages) { OWSFail(@"%@ sync message has device messages for unknown secondary devices.", self.logTag); - } else { - // Account has secondary devices; proceed as usual. } } else { OWSAssert(deviceMessages.count > 0);