mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-10-05 02:48:44 +02:00
feat: Compatible with Famedly and Element QR Codes
This commit is contained in:
parent
8aa0670e83
commit
a5f6e8e77f
@ -76,7 +76,12 @@ class UrlLauncher {
|
|||||||
// The identifier might be a matrix.to url and needs escaping. Or, it might have multiple
|
// The identifier might be a matrix.to url and needs escaping. Or, it might have multiple
|
||||||
// identifiers (room id & event id), or it might also have a query part.
|
// identifiers (room id & event id), or it might also have a query part.
|
||||||
// All this needs parsing.
|
// All this needs parsing.
|
||||||
final identityParts = url.parseIdentifierIntoParts();
|
final identityParts = url.parseIdentifierIntoParts() ??
|
||||||
|
Uri.tryParse(url)?.host?.parseIdentifierIntoParts() ??
|
||||||
|
Uri.tryParse(url)
|
||||||
|
?.pathSegments
|
||||||
|
?.lastWhere((_) => true, orElse: () => null)
|
||||||
|
?.parseIdentifierIntoParts();
|
||||||
if (identityParts == null) {
|
if (identityParts == null) {
|
||||||
return; // no match, nothing to do
|
return; // no match, nothing to do
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user