Merge branch 'mkirk/sae-crash' into hotfix/2.32.2

pull/1/head
Michael Kirk 6 years ago
commit b0318f59d1

@ -232,6 +232,7 @@ typedef void (^SendMessageBlock)(SendCompletionBlock completion);
- (void)attachmentApproval:(AttachmentApprovalViewController *)approvalViewController
didApproveAttachments:(NSArray<SignalAttachment *> *)attachments
messageText:(NSString *_Nullable)messageText
{
[ThreadUtil addThreadToProfileWhitelistIfEmptyContactThread:self.thread];
[self tryToSendMessageWithBlock:^(SendCompletionBlock sendCompletion) {
@ -243,6 +244,7 @@ typedef void (^SendMessageBlock)(SendCompletionBlock completion);
// SAE runs as long as it needs.
// TODO ALBUMS - send album via SAE
outgoingMessage = [ThreadUtil sendMessageNonDurablyWithAttachment:attachments.firstObject
messageBody:messageText
inThread:self.thread
quotedReplyModel:nil
messageSender:self.messageSender

@ -73,6 +73,7 @@ NS_ASSUME_NONNULL_BEGIN
// Used by SAE, otherwise we should use the durable `enqueue` counterpart
+ (TSOutgoingMessage *)sendMessageNonDurablyWithAttachment:(SignalAttachment *)attachment
messageBody:(nullable NSString *)messageBody
inThread:(TSThread *)thread
quotedReplyModel:(nullable OWSQuotedReplyModel *)quotedReplyModel
messageSender:(OWSMessageSender *)messageSender

@ -214,6 +214,7 @@ NS_ASSUME_NONNULL_BEGIN
}
+ (TSOutgoingMessage *)sendMessageNonDurablyWithAttachment:(SignalAttachment *)attachment
messageBody:(nullable NSString *)messageBody
inThread:(TSThread *)thread
quotedReplyModel:(nullable OWSQuotedReplyModel *)quotedReplyModel
messageSender:(OWSMessageSender *)messageSender
@ -232,7 +233,7 @@ NS_ASSUME_NONNULL_BEGIN
TSOutgoingMessage *message =
[[TSOutgoingMessage alloc] initOutgoingMessageWithTimestamp:[NSDate ows_millisecondTimeStamp]
inThread:thread
messageBody:attachment.captionText
messageBody:messageBody
attachmentIds:[NSMutableArray new]
expiresInSeconds:expiresInSeconds
expireStartedAt:0

Loading…
Cancel
Save