mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Fixed an issue where open groups with no scheme in the url might not match correctly
This commit is contained in:
parent
a7895d6581
commit
7ae1342341
1 changed files with 3 additions and 1 deletions
|
@ -31,7 +31,9 @@ public final class OpenGroupManagerV2 : NSObject {
|
|||
// MARK: Adding & Removing
|
||||
|
||||
public func hasExistingOpenGroup(room: String, server: String, publicKey: String, using transaction: YapDatabaseReadWriteTransaction) -> Bool {
|
||||
let schemeFreeServer: String = (server.starts(with: "https://") ? server.substring(from: "https://".count) : server.substring(from: "http://".count))
|
||||
guard let serverUrl: URL = URL(string: server) else { return false }
|
||||
|
||||
let schemeFreeServer: String = (serverUrl.host ?? server)
|
||||
let schemeFreeDefaultServer: String = OpenGroupAPIV2.defaultServer.substring(from: "http://".count)
|
||||
var serverOptions: Set<String> = Set([
|
||||
schemeFreeServer,
|
||||
|
|
Loading…
Reference in a new issue