clarify sync logging

pull/1/head
Michael Kirk 7 years ago
parent 8576de0618
commit 1e8c7d63b8

@ -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);

Loading…
Cancel
Save