Merge pull request #4902 from 21pages/urilink

add missing uri pattern
This commit is contained in:
RustDesk 2023-07-07 21:08:52 +08:00 committed by GitHub
commit 54d03b2ecf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1593,6 +1593,7 @@ bool handleUriLink({List<String>? cmdArgs, Uri? uri, String? uriString}) {
List<String>? args;
if (cmdArgs != null) {
args = cmdArgs;
// rustdesk <uri link>
if (args.isNotEmpty && args[0].startsWith(kUniLinksPrefix)) {
final uri = Uri.tryParse(args[0]);
if (uri != null) {
@ -1701,6 +1702,10 @@ List<String>? urlLinkToCmdArgs(Uri uri) {
if (uri.path.length > 1) {
id = uri.path.substring(1);
}
} else if (uri.authority.length > 2 && uri.path.length <= 1) {
// rustdesk://<connect-id>
command = '--connect';
id = uri.authority;
}
List<String> args = List.empty(growable: true);