From 80ef8bc9f7f33da929474591cf38b7dbf2511c01 Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Thu, 29 Aug 2019 10:35:02 +1000 Subject: [PATCH] Disable note to self --- Signal/src/Loki/NewConversationViewController.swift | 4 ++++ Signal/translations/en.lproj/Localizable.strings | 2 ++ 2 files changed, 6 insertions(+) diff --git a/Signal/src/Loki/NewConversationViewController.swift b/Signal/src/Loki/NewConversationViewController.swift index a7e89efcb..f47c05e5c 100644 --- a/Signal/src/Loki/NewConversationViewController.swift +++ b/Signal/src/Loki/NewConversationViewController.swift @@ -105,6 +105,10 @@ final class NewConversationViewController : OWSViewController, OWSQRScannerDeleg let alert = UIAlertController(title: NSLocalizedString("Invalid Public Key", comment: ""), message: NSLocalizedString("Please check the public key you entered and try again.", comment: ""), preferredStyle: .alert) alert.addAction(UIAlertAction(title: NSLocalizedString("OK", comment: ""), style: .default, handler: nil)) presentAlert(alert) + } else if OWSIdentityManager.shared().identityKeyPair()!.hexEncodedPublicKey == hexEncodedPublicKey { + let alert = UIAlertController(title: NSLocalizedString("Can't Start Conversation", comment: ""), message: NSLocalizedString("Please enter the public key of the person you'd like to message.", comment: ""), preferredStyle: .alert) + alert.addAction(UIAlertAction(title: NSLocalizedString("OK", comment: ""), style: .default, handler: nil)) + presentAlert(alert) } else { let thread = TSContactThread.getOrCreateThread(contactId: hexEncodedPublicKey) SignalApp.shared().presentConversation(for: thread, action: .compose, animated: false) diff --git a/Signal/translations/en.lproj/Localizable.strings b/Signal/translations/en.lproj/Localizable.strings index 94e785776..fe08c09f0 100644 --- a/Signal/translations/en.lproj/Localizable.strings +++ b/Signal/translations/en.lproj/Localizable.strings @@ -2617,3 +2617,5 @@ "Scan the QR code of the person you'd like to securely message. They can find their QR code by going into Loki Messenger's in-app settings and clicking \"Show QR Code\"." = "Scan the QR code of the person you'd like to securely message. They can find their QR code by going into Loki Messenger's in-app settings and clicking \"Show QR Code\"."; "Scan QR Code" = "Scan QR Code"; "Loki" = "Loki"; +"Can't Start Conversation" = "Can't Start Conversation"; +"Please enter the public key of the person you'd like to message." = "Please enter the public key of the person you'd like to message.";