diff --git a/Signal/Signal-Info.plist b/Signal/Signal-Info.plist
index 7396df8e5..080407c4e 100644
--- a/Signal/Signal-Info.plist
+++ b/Signal/Signal-Info.plist
@@ -5,7 +5,7 @@
BuildDetails
CarthageVersion
- 0.33.0
+ 0.32.0
OSXVersion
10.14.4
WebRTCCommit
diff --git a/Signal/src/ViewControllers/Registration/Onboarding2FAViewController.swift b/Signal/src/ViewControllers/Registration/Onboarding2FAViewController.swift
index 7acbfb9b7..6edc93c36 100644
--- a/Signal/src/ViewControllers/Registration/Onboarding2FAViewController.swift
+++ b/Signal/src/ViewControllers/Registration/Onboarding2FAViewController.swift
@@ -60,12 +60,12 @@ public class Onboarding2FAViewController: OnboardingBaseViewController {
validationWarningLabel.ows_autoPinToSuperviewEdges()
validationWarningRow.autoSetDimension(.height, toSize: validationWarningLabel.font.lineHeight)
- let forgotPinLink = self.linkButton(title: NSLocalizedString("ONBOARDING_2FA_FORGOT_PIN_LINK",
+ let forgotPinLink = self.createLinkButton(title: NSLocalizedString("ONBOARDING_2FA_FORGOT_PIN_LINK",
comment: "Label for the 'forgot 2FA PIN' link in the 'onboarding 2FA' view."),
selector: #selector(forgotPinLinkTapped))
forgotPinLink.accessibilityIdentifier = "onboarding.2fa." + "forgotPinLink"
- let nextButton = self.button(title: NSLocalizedString("BUTTON_NEXT",
+ let nextButton = self.createButton(title: NSLocalizedString("BUTTON_NEXT",
comment: "Label for the 'next' button."),
selector: #selector(nextPressed))
nextButton.accessibilityIdentifier = "onboarding.2fa." + "nextButton"
diff --git a/Signal/src/ViewControllers/Registration/OnboardingAccountDetailsViewController.swift b/Signal/src/ViewControllers/Registration/OnboardingAccountDetailsViewController.swift
index af5f9097d..603820538 100644
--- a/Signal/src/ViewControllers/Registration/OnboardingAccountDetailsViewController.swift
+++ b/Signal/src/ViewControllers/Registration/OnboardingAccountDetailsViewController.swift
@@ -41,7 +41,7 @@ final class OnboardingAccountDetailsViewController : OnboardingBaseViewControlle
let passwordLabel = createExplanationLabel(text: NSLocalizedString("Type an optional password for added security", comment: ""))
passwordLabel.accessibilityIdentifier = "onboarding.accountDetailsStep.passwordLabel"
let bottomSpacer = UIView.vStretchingSpacer()
- let nextButton = button(title: NSLocalizedString("Next", comment: ""), selector: #selector(updateProfile))
+ let nextButton = createButton(title: NSLocalizedString("Next", comment: ""), selector: #selector(updateProfile))
nextButton.accessibilityIdentifier = "onboarding.accountDetailsStep.nextButton"
let stackView = UIStackView(arrangedSubviews: [
titleLabel,
diff --git a/Signal/src/ViewControllers/Registration/OnboardingBaseViewController.swift b/Signal/src/ViewControllers/Registration/OnboardingBaseViewController.swift
index 81ffb02c3..c68ae4d25 100644
--- a/Signal/src/ViewControllers/Registration/OnboardingBaseViewController.swift
+++ b/Signal/src/ViewControllers/Registration/OnboardingBaseViewController.swift
@@ -49,11 +49,11 @@ public class OnboardingBaseViewController: OWSViewController {
return explanationLabel
}
- func button(title: String, selector: Selector) -> OWSFlatButton {
+ func createButton(title: String, selector: Selector) -> OWSFlatButton {
return button(title: title, selector: selector, titleColor: .white, backgroundColor: .ows_materialBlue)
}
- func linkButton(title: String, selector: Selector) -> OWSFlatButton {
+ func createLinkButton(title: String, selector: Selector) -> OWSFlatButton {
return button(title: title, selector: selector, titleColor: .ows_materialBlue, backgroundColor: .white)
}
diff --git a/Signal/src/ViewControllers/Registration/OnboardingPermissionsViewController.swift b/Signal/src/ViewControllers/Registration/OnboardingPermissionsViewController.swift
index b7ce02af4..82f21c825 100644
--- a/Signal/src/ViewControllers/Registration/OnboardingPermissionsViewController.swift
+++ b/Signal/src/ViewControllers/Registration/OnboardingPermissionsViewController.swift
@@ -26,12 +26,12 @@ public class OnboardingPermissionsViewController: OnboardingBaseViewController {
comment: "Explanation in the 'onboarding permissions' view."))
explanationLabel.accessibilityIdentifier = "onboarding.permissions." + "explanationLabel"
- let giveAccessButton = self.button(title: NSLocalizedString("ONBOARDING_PERMISSIONS_ENABLE_PERMISSIONS_BUTTON",
+ let giveAccessButton = self.createButton(title: NSLocalizedString("ONBOARDING_PERMISSIONS_ENABLE_PERMISSIONS_BUTTON",
comment: "Label for the 'give access' button in the 'onboarding permissions' view."),
selector: #selector(giveAccessPressed))
giveAccessButton.accessibilityIdentifier = "onboarding.permissions." + "giveAccessButton"
- let notNowButton = self.linkButton(title: NSLocalizedString("ONBOARDING_PERMISSIONS_NOT_NOW_BUTTON",
+ let notNowButton = self.createLinkButton(title: NSLocalizedString("ONBOARDING_PERMISSIONS_NOT_NOW_BUTTON",
comment: "Label for the 'not now' button in the 'onboarding permissions' view."),
selector: #selector(notNowPressed))
notNowButton.accessibilityIdentifier = "onboarding.permissions." + "notNowButton"
diff --git a/Signal/src/ViewControllers/Registration/OnboardingProfileViewController.swift b/Signal/src/ViewControllers/Registration/OnboardingProfileViewController.swift
index 5ad632c5b..2e94c34b9 100644
--- a/Signal/src/ViewControllers/Registration/OnboardingProfileViewController.swift
+++ b/Signal/src/ViewControllers/Registration/OnboardingProfileViewController.swift
@@ -37,7 +37,7 @@ public class OnboardingProfileViewController: OnboardingBaseViewController {
comment: "Explanation in the 'onboarding profile' view."))
explanationLabel.accessibilityIdentifier = "onboarding.profile." + "explanationLabel"
- let nextButton = self.button(title: NSLocalizedString("BUTTON_NEXT",
+ let nextButton = self.createButton(title: NSLocalizedString("BUTTON_NEXT",
comment: "Label for the 'next' button."),
selector: #selector(nextPressed))
nextButton.accessibilityIdentifier = "onboarding.profile." + "nextButton"
diff --git a/Signal/src/ViewControllers/Registration/OnboardingPublicKeyViewController.swift b/Signal/src/ViewControllers/Registration/OnboardingPublicKeyViewController.swift
index aa072280b..b646940ad 100644
--- a/Signal/src/ViewControllers/Registration/OnboardingPublicKeyViewController.swift
+++ b/Signal/src/ViewControllers/Registration/OnboardingPublicKeyViewController.swift
@@ -36,8 +36,10 @@ final class OnboardingPublicKeyViewController : OnboardingBaseViewController {
let topSpacer = UIView.vStretchingSpacer()
let explanationLabel = createExplanationLabel(text: NSLocalizedString("Please save the seed below in a safe location. It can be used to restore your account if you lose access, or to migrate to a new device.", comment: ""))
explanationLabel.accessibilityIdentifier = "onboarding.publicKeyStep.explanationLabel"
+ let copyButton = createLinkButton(title: NSLocalizedString("Copy", comment: ""), selector: #selector(copyMnemonic))
+ copyButton.accessibilityIdentifier = "onboarding.publicKeyStep.copyButton"
let bottomSpacer = UIView.vStretchingSpacer()
- let registerButton = button(title: NSLocalizedString("Register", comment: ""), selector: #selector(register))
+ let registerButton = createButton(title: NSLocalizedString("Register", comment: ""), selector: #selector(register))
registerButton.accessibilityIdentifier = "onboarding.publicKeyStep.registerButton"
let stackView = UIStackView(arrangedSubviews: [
titleLabel,
@@ -45,6 +47,8 @@ final class OnboardingPublicKeyViewController : OnboardingBaseViewController {
explanationLabel,
UIView.spacer(withHeight: 32),
mnemonicLabel,
+ UIView.spacer(withHeight: 24),
+ copyButton,
bottomSpacer,
registerButton
])
@@ -69,7 +73,11 @@ final class OnboardingPublicKeyViewController : OnboardingBaseViewController {
hexEncodedPublicKey = keyPair.publicKey.map { String(format: "%02hhx", $0) }.joined()
mnemonic = Mnemonic.encode(hexEncodedString: hexEncodedPublicKey)
}
-
+
+ @objc private func copyMnemonic() {
+ UIPasteboard.general.string = mnemonic
+ }
+
@objc private func register() {
let accountManager = TSAccountManager.sharedInstance()
accountManager.phoneNumberAwaitingVerification = hexEncodedPublicKey
diff --git a/Signal/src/ViewControllers/Registration/OnboardingSplashViewController.swift b/Signal/src/ViewControllers/Registration/OnboardingSplashViewController.swift
index 625dd0bac..960719d54 100644
--- a/Signal/src/ViewControllers/Registration/OnboardingSplashViewController.swift
+++ b/Signal/src/ViewControllers/Registration/OnboardingSplashViewController.swift
@@ -40,7 +40,7 @@ public class OnboardingSplashViewController: OnboardingBaseViewController {
explanationLabel.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(explanationLabelTapped)))
explanationLabel.accessibilityIdentifier = "onboarding.splash." + "explanationLabel"
- let continueButton = self.button(title: NSLocalizedString("BUTTON_CONTINUE",
+ let continueButton = self.createButton(title: NSLocalizedString("BUTTON_CONTINUE",
comment: "Label for 'continue' button."),
selector: #selector(continuePressed))
view.addSubview(continueButton)
diff --git a/Signal/src/ViewControllers/Registration/OnboardingVerificationViewController.swift b/Signal/src/ViewControllers/Registration/OnboardingVerificationViewController.swift
index ed12b7da3..2cae744d8 100644
--- a/Signal/src/ViewControllers/Registration/OnboardingVerificationViewController.swift
+++ b/Signal/src/ViewControllers/Registration/OnboardingVerificationViewController.swift
@@ -279,7 +279,7 @@ public class OnboardingVerificationViewController: OnboardingBaseViewController
self.titleLabel = titleLabel
titleLabel.accessibilityIdentifier = "onboarding.verification." + "titleLabel"
- let backLink = self.linkButton(title: NSLocalizedString("ONBOARDING_VERIFICATION_BACK_LINK",
+ let backLink = self.createLinkButton(title: NSLocalizedString("ONBOARDING_VERIFICATION_BACK_LINK",
comment: "Label for the link that lets users change their phone number in the onboarding views."),
selector: #selector(backLinkTapped))
self.backLink = backLink
@@ -300,7 +300,7 @@ public class OnboardingVerificationViewController: OnboardingBaseViewController
errorRow.addSubview(errorLabel)
errorLabel.autoPinEdgesToSuperviewEdges()
- let codeStateLink = self.linkButton(title: "",
+ let codeStateLink = self.createLinkButton(title: "",
selector: #selector(resendCodeLinkTapped))
codeStateLink.enableMultilineLabel()
self.codeStateLink = codeStateLink
diff --git a/Signal/translations/en.lproj/Localizable.strings b/Signal/translations/en.lproj/Localizable.strings
index 2c768028f..d9fe13f8b 100644
--- a/Signal/translations/en.lproj/Localizable.strings
+++ b/Signal/translations/en.lproj/Localizable.strings
@@ -2552,4 +2552,5 @@
"Type an optional password for added security" = "Type an optional password for added security";
"Password (Optional)" = "Password (Optional)";
"Please save the seed below in a safe location. It can be used to restore your account if you lose access, or to migrate to a new device." = "Please save the seed below in a safe location. It can be used to restore your account if you lose access, or to migrate to a new device.";
+"Copy" = "Copy";
"Register" = "Register";
diff --git a/SignalServiceKit/protobuf/SignalService.proto b/SignalServiceKit/protobuf/SignalService.proto
index 8269f38ec..5dffbd283 100644
--- a/SignalServiceKit/protobuf/SignalService.proto
+++ b/SignalServiceKit/protobuf/SignalService.proto
@@ -22,6 +22,7 @@ message Envelope {
PREKEY_BUNDLE = 3;
RECEIPT = 5;
UNIDENTIFIED_SENDER = 6;
+ FRIEND_REQUEST = 101; // Loki: Contains prekeys and a message; uses simple encryption
}
// @required
@@ -53,12 +54,29 @@ message TypingMessage {
}
message Content {
- optional DataMessage dataMessage = 1;
- optional SyncMessage syncMessage = 2;
- optional CallMessage callMessage = 3;
- optional NullMessage nullMessage = 4;
- optional ReceiptMessage receiptMessage = 5;
- optional TypingMessage typingMessage = 6;
+ optional DataMessage dataMessage = 1;
+ optional SyncMessage syncMessage = 2;
+ optional CallMessage callMessage = 3;
+ optional NullMessage nullMessage = 4;
+ optional ReceiptMessage receiptMessage = 5;
+ optional TypingMessage typingMessage = 6;
+ optional PrekeyBundleMessage prekeyBundleMessage = 101; // Loki
+ optional LokiAddressMessage LokiAddressMessage = 102; // Loki
+}
+
+message PrekeyBundleMessage { // Loki
+ optional bytes identityKey = 1;
+ optional uint32 deviceID = 2;
+ optional uint32 prekeyID = 3;
+ optional uint32 signedKeyID = 4;
+ optional bytes prekey = 5;
+ optional bytes signedKey = 6;
+ optional bytes signature = 7;
+}
+
+message LokiAddressMessage { // Loki
+ optional string p2pAddress = 1;
+ optional uint32 p2pPort = 2;
}
message CallMessage {
@@ -222,7 +240,8 @@ message DataMessage {
optional uint64 timestamp = 7;
optional Quote quote = 8;
repeated Contact contact = 9;
- repeated Preview preview = 10;
+ repeated Preview preview = 10;
+ optional Contact profile = 101; // Loki: The current user's profile
}
message NullMessage {