interstitial SN confirmation for attachments/voicenotes
// FREEBIE
This commit is contained in:
parent
47783a9df0
commit
2d7f03a1c8
|
@ -1702,7 +1702,6 @@ typedef enum : NSUInteger {
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
[self.outboundCallInitiator initiateCallWithRecipientId:self.thread.contactIdentifier];
|
||||
}
|
||||
|
||||
|
@ -3706,6 +3705,20 @@ typedef enum : NSUInteger {
|
|||
return;
|
||||
}
|
||||
|
||||
OWSRecipientIdentity *unconfirmedIdentityThatShouldBlockSending = [self unconfirmedIdentityThatShouldBlockSending];
|
||||
if (unconfirmedIdentityThatShouldBlockSending != nil) {
|
||||
__weak MessagesViewController *weakSelf = self;
|
||||
[self showConfirmIdentityUIForRecipientIdentity:unconfirmedIdentityThatShouldBlockSending
|
||||
confirmationText:NSLocalizedString(@"CONFIRMATION_TITLE",
|
||||
@"Generic button text to proceed with an action")
|
||||
completion:^(BOOL didConfirmedIdentity) {
|
||||
if (didConfirmedIdentity) {
|
||||
[weakSelf didPressAccessoryButton:nil];
|
||||
}
|
||||
}];
|
||||
return;
|
||||
}
|
||||
|
||||
UIAlertController *actionSheetController = [UIAlertController alertControllerWithTitle:nil
|
||||
message:nil
|
||||
preferredStyle:UIAlertControllerStyleActionSheet];
|
||||
|
@ -3946,6 +3959,23 @@ typedef enum : NSUInteger {
|
|||
return;
|
||||
}
|
||||
|
||||
OWSRecipientIdentity *unconfirmedIdentityThatShouldBlockSending =
|
||||
[self unconfirmedIdentityThatShouldBlockSending];
|
||||
if (unconfirmedIdentityThatShouldBlockSending != nil) {
|
||||
__weak MessagesViewController *weakSelf = self;
|
||||
[self showConfirmIdentityUIForRecipientIdentity:unconfirmedIdentityThatShouldBlockSending
|
||||
confirmationText:NSLocalizedString(
|
||||
@"SAFETY_NUMBER_CHANGED_CONFIRM_SEND_ACTION",
|
||||
@"button title to confirm sending to a recipient whose "
|
||||
@"safety number recently changed")
|
||||
completion:^(BOOL didConfirmedIdentity) {
|
||||
if (didConfirmedIdentity) {
|
||||
[weakSelf tryToSendAttachmentIfApproved:attachment];
|
||||
}
|
||||
}];
|
||||
return;
|
||||
}
|
||||
|
||||
if (attachment == nil || [attachment hasError]) {
|
||||
DDLogWarn(@"%@ %s Invalid attachment: %@.",
|
||||
self.tag,
|
||||
|
|
Loading…
Reference in New Issue