Show alert when trying to call a non-signal contact from Contacts.

// FREEBIE
This commit is contained in:
Michael Kirk 2017-02-01 19:22:25 -05:00
parent b35c20a06b
commit 7e825648ef
3 changed files with 9 additions and 3 deletions

View File

@ -141,7 +141,7 @@ CHECKOUT OPTIONS:
:commit: 919d541d6b8a8802a94f943026b8f68394e2c0b8
:git: https://github.com/WhisperSystems/SignalProtocolKit.git
SignalServiceKit:
:commit: 7ca1d5e8a62273b524281d905c560b08c7c22039
:commit: c68073fdb13e917b2977dc17b928dd515123c21b
:git: https://github.com/WhisperSystems/SignalServiceKit.git
SocketRocket:
:commit: 41b57bb2fc292a814f758441a05243eb38457027

View File

@ -65,7 +65,13 @@ import Foundation
},
failure: { error in
Logger.warn("\(self.TAG) looking up recipientId: \(recipientId) failed with error \(error)")
// TODO fail with alert. e.g. when someone tries to call a non signal user from their contacts we should inform them.
let alertTitle = NSLocalizedString("UNABLE_TO_PLACE_CALL", comment:"Alert Title")
let alertController = UIAlertController(title: alertTitle, message: error.localizedDescription, preferredStyle: .alert)
let dismissAction = UIAlertAction(title: NSLocalizedString("DISMISS_BUTTON_TEXT", comment: "Generic short text for button to dismiss a dialog"), style: .default)
alertController.addAction(dismissAction)
UIApplication.shared.keyWindow?.rootViewController?.present(alertController, animated: true, completion: nil)
})
// Since we've already dispatched async to make sure we have fresh webrtc preference data

View File

@ -248,7 +248,7 @@
"ERROR_DESCRIPTION_UNKNOWN_ERROR" = "An unkown error occurred.";
/* Error message when attempting to send message */
"ERROR_DESCRIPTION_UNREGISTERED_RECIPIENT" = "Recipient is no longer a Signal user.";
"ERROR_DESCRIPTION_UNREGISTERED_RECIPIENT" = "Contact is not a Signal user.";
/* No comment provided by engineer. */
"ERROR_MESSAGE_DUPLICATE_MESSAGE" = "Received a duplicated message.";