Support "sgnl" form of group links.

This commit is contained in:
Matthew Chen 2020-10-02 16:43:40 -03:00
parent 4b15fb31d7
commit 0fe8b0e476
2 changed files with 18 additions and 1 deletions

View File

@ -43,6 +43,16 @@
<string>sgnl</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>signal.group</string>
<key>CFBundleURLSchemes</key>
<array>
<string>sgnl</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>3.18.0.7</string>

View File

@ -1409,7 +1409,14 @@ public class GroupsV2Impl: NSObject, GroupsV2Swift {
}
public func isPossibleGroupInviteLink(_ url: URL) -> Bool {
return url.scheme == "https" && url.host == "signal.group"
guard url.host == "signal.group" else {
return false
}
guard let scheme = url.scheme else {
return false
}
let schemes = ["https", "sgnl"]
return schemes.contains(scheme)
}
public func parseGroupInviteLink(_ url: URL) -> GroupInviteLinkInfo? {