|
|
|
@ -265,7 +265,9 @@ NSUInteger const OWSSendMessageOperationMaxRetries = 4;
|
|
|
|
|
{
|
|
|
|
|
// Should call `startBackgroundTask` before enqueuing the operation
|
|
|
|
|
// to ensure we don't get suspended before the operation completes.
|
|
|
|
|
OWSAssert(self.backgroundTaskIdentifier != UIBackgroundTaskInvalid);
|
|
|
|
|
|
|
|
|
|
// FIXME SHARINGEXTENSION
|
|
|
|
|
// OWSAssert(self.backgroundTaskIdentifier != UIBackgroundTaskInvalid);
|
|
|
|
|
|
|
|
|
|
[self willChangeValueForKey:OWSSendMessageOperationKeyIsExecuting];
|
|
|
|
|
self.operationState = OWSSendMessageOperationStateExecuting;
|
|
|
|
@ -456,7 +458,9 @@ NSString *const OWSMessageSenderRateLimitedException = @"RateLimitedException";
|
|
|
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
|
|
// We call `startBackgroundTask` here to prevent our app from suspending while being backgrounded
|
|
|
|
|
// until the operation is completed - at which point the OWSSendMessageOperation ends it's background task.
|
|
|
|
|
[sendMessageOperation startBackgroundTask];
|
|
|
|
|
|
|
|
|
|
// FIXME SHARINGEXTENSION
|
|
|
|
|
// [sendMessageOperation startBackgroundTask];
|
|
|
|
|
|
|
|
|
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
|
|
|
NSOperationQueue *sendingQueue = [self sendingQueueForMessage:message];
|
|
|
|
|