Support discord:// uri scheme (#813)

Co-authored-by: v <vendicated@riseup.net>
This commit is contained in:
Cookie
2025-02-06 03:45:20 +01:00
committed by GitHub
co-authored by v
parent 6ba562c663
commit 7560727372
3 changed files with 33 additions and 7 deletions
+8
View File
@@ -29,6 +29,8 @@ console.log("Vesktop v" + app.getVersion());
process.env.VENCORD_USER_DATA_DIR = DATA_DIR;
function init() {
app.setAsDefaultProtocolClient("discord");
const { disableSmoothScroll, hardwareAcceleration } = Settings.store;
const enabledFeatures = app.commandLine.getSwitchValue("enable-features").split(",");
@@ -119,6 +121,12 @@ async function bootstrap() {
}
}
// MacOS only event
export let darwinURL: string | undefined;
app.on("open-url", (_, url) => {
darwinURL = url;
});
app.on("window-all-closed", () => {
if (process.platform !== "darwin") app.quit();
});