enable user to join a public chat without entering "https://"

pull/89/head
Ryan ZHAO 5 years ago
parent 9a3a9b713c
commit 3e5d9bc66b

@ -258,7 +258,10 @@ private final class EnterChatURLVC : UIViewController {
// MARK: Interaction
@objc private func joinPublicChatIfPossible() {
let chatURL = chatURLTextField.text?.trimmingCharacters(in: .whitespaces) ?? ""
var chatURL = chatURLTextField.text?.trimmingCharacters(in: .whitespaces) ?? ""
if !chatURL.starts(with: "http") {
chatURL = "https://" + chatURL
}
joinPublicChatVC.joinPublicChatIfPossible(with: chatURL)
}
}

Loading…
Cancel
Save