diff --git a/src/main/utils/constants.ts b/src/main/utils/constants.ts index 2c997461e..3250a51e0 100644 --- a/src/main/utils/constants.ts +++ b/src/main/utils/constants.ts @@ -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); } -} +} \ No newline at end of file diff --git a/src/plugins/openInApp/index.ts b/src/plugins/openInApp/index.ts index 60012f735..eba7a195f 100644 --- a/src/plugins/openInApp/index.ts +++ b/src/plugins/openInApp/index.ts @@ -65,6 +65,11 @@ const UrlReplacementRules: Record = { 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" } };