Adding a support for Telegram link for "OpenInApp" plugin (#1152)

* Adding a support for Telegram link for "OpenInApp" plugin

* Update src/plugins/openInApp/index.ts

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
Choko 2026-06-07 00:08:22 +02:00 • committed by GitHub
parent 546da118de
commit 98111c7aa5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View file

@ -43,6 +43,7 @@ export const ALLOWED_PROTOCOLS = [
"tidal:",
"itunes:",
"vrcx:",
"tg:",
];
export const IS_VANILLA = /* @__PURE__ */ process.argv.includes("--vanilla");
@ -71,4 +72,4 @@ if (IS_DEV) {
}
}, 5000);
}
}
}

View file

@ -65,6 +65,11 @@ const UrlReplacementRules: Record<string, URLReplacementRule> = {
match: /^https:\/\/vrchat.com\/home\/(user|avatar|world|group)\/(.+)$/,
replace: (_, type, id) => `vrcx://${type}/${id}`,
description: "Open VRChat links in the VRCX app"
},
telegram: {
match: /^https:\/\/t\.me\/([a-zA-Z0-9_]+)$/,
replace: (_, username) => `tg://resolve?domain=${username}`,
description: "Open Telegram links in the Telegram app"
}
};