|
|
@ -1118,6 +1118,12 @@ NSString *const OWSMessageSenderRateLimitedException = @"RateLimitedException";
|
|
|
|
// so that we can learn from the service whether or not there are
|
|
|
|
// so that we can learn from the service whether or not there are
|
|
|
|
// linked devices that we don't know about.
|
|
|
|
// linked devices that we don't know about.
|
|
|
|
OWSLogWarn(@"Sending a message with no device messages.");
|
|
|
|
OWSLogWarn(@"Sending a message with no device messages.");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Loki: We don't handle linked devices yet so it's better to just exit early
|
|
|
|
|
|
|
|
// This would only occur if we're sending a message to ourself
|
|
|
|
|
|
|
|
NSError *error = OWSErrorMakeFailedToSendOutgoingMessageError();
|
|
|
|
|
|
|
|
[error setIsRetryable:NO];
|
|
|
|
|
|
|
|
return messageSend.failure(error);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: Update message here to show the pow cog icon
|
|
|
|
// TODO: Update message here to show the pow cog icon
|
|
|
@ -1141,7 +1147,7 @@ NSString *const OWSMessageSenderRateLimitedException = @"RateLimitedException";
|
|
|
|
messages:deviceMessages
|
|
|
|
messages:deviceMessages
|
|
|
|
timeStamp:message.timestamp
|
|
|
|
timeStamp:message.timestamp
|
|
|
|
udAccessKey:udAccessKey];
|
|
|
|
udAccessKey:udAccessKey];
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
}
|
|
|
|
}
|
|
|
|
udAuthFailureBlock:^{
|
|
|
|
udAuthFailureBlock:^{
|
|
|
|
// Note the UD auth failure so subsequent retries
|
|
|
|
// Note the UD auth failure so subsequent retries
|
|
|
@ -1516,7 +1522,13 @@ NSString *const OWSMessageSenderRateLimitedException = @"RateLimitedException";
|
|
|
|
messageSend.isLocalNumber,
|
|
|
|
messageSend.isLocalNumber,
|
|
|
|
messageSend.isUDSend);
|
|
|
|
messageSend.isUDSend);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Loki: Since we don't support multi-device sending yet, just send it to the primary device
|
|
|
|
|
|
|
|
NSMutableArray<NSNumber *> *deviceIds = @[@(OWSDevicePrimaryDeviceId)];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Original code:
|
|
|
|
NSMutableArray<NSNumber *> *deviceIds = [recipient.devices mutableCopy];
|
|
|
|
NSMutableArray<NSNumber *> *deviceIds = [recipient.devices mutableCopy];
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
OWSAssertDebug(deviceIds);
|
|
|
|
OWSAssertDebug(deviceIds);
|
|
|
|
|
|
|
|
|
|
|
|
if (messageSend.isLocalNumber) {
|
|
|
|
if (messageSend.isLocalNumber) {
|
|
|
|