Fix re-prompting to register as default client for protocols if we already are

Signed-off-by: Alex Lowe <alex.lowe@canonical.com>
Co-authored-by: Alex Lowe <alex.lowe@canonical.com>
This commit is contained in:
Jamie
2026-03-02 10:12:02 -08:00
committed by GitHub
parent bcd6d18d6f
commit 6706732814

View File

@@ -2639,8 +2639,24 @@ app.on(
}
);
app.setAsDefaultProtocolClient('sgnl');
app.setAsDefaultProtocolClient('signalcaptcha');
if (!app.isDefaultProtocolClient('sgnl')) {
log.info('setting signal as the default app for the sgnl url scheme');
app.setAsDefaultProtocolClient('sgnl');
} else {
log.info(
'signal is already registered as the default app for the sgnl url scheme.'
);
}
if (!app.isDefaultProtocolClient('signalcaptcha')) {
log.info(
'setting signal as the default app for the signalcaptcha url scheme'
);
app.setAsDefaultProtocolClient('signalcaptcha');
} else {
log.info(
'signal is already registered as the default app for the sgnl url scheme.'
);
}
ipc.on(
'set-badge',