Merge pull request #89 from RyanRory/join-publich-chat-without-https

Enable the User to Join an Open Group Without Entering "https://"
This commit is contained in:
gmbnt 2020-02-10 12:05:24 +11:00 committed by GitHub
commit 17a989e9c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.lowercased().starts(with: "http") {
chatURL = "https://" + chatURL
}
joinPublicChatVC.joinPublicChatIfPossible(with: chatURL)
}
}