Support for joining New Groups via invite links
This commit is contained in:
13
main.js
13
main.js
@@ -1428,7 +1428,7 @@ function getIncomingHref(argv) {
|
||||
}
|
||||
|
||||
function handleSgnlHref(incomingHref) {
|
||||
const { command, args } = parseSgnlHref(incomingHref, logger);
|
||||
const { command, args, hash } = parseSgnlHref(incomingHref, logger);
|
||||
if (command === 'addstickers' && mainWindow && mainWindow.webContents) {
|
||||
console.log('Opening sticker pack from sgnl protocol link');
|
||||
const packId = args.get('pack_id');
|
||||
@@ -1437,6 +1437,17 @@ function handleSgnlHref(incomingHref) {
|
||||
? Buffer.from(packKeyHex, 'hex').toString('base64')
|
||||
: '';
|
||||
mainWindow.webContents.send('show-sticker-pack', { packId, packKey });
|
||||
} else if (
|
||||
command === 'signal.group' &&
|
||||
hash &&
|
||||
mainWindow &&
|
||||
mainWindow.webContents
|
||||
) {
|
||||
console.log('Showing group from sgnl protocol link');
|
||||
mainWindow.webContents.send('show-group-via-link', { hash });
|
||||
} else if (mainWindow && mainWindow.webContents) {
|
||||
console.log('Showing warning that we cannot process link');
|
||||
mainWindow.webContents.send('unknown-sgnl-link');
|
||||
} else {
|
||||
console.error('Unhandled sgnl link');
|
||||
}
|
||||
|
Reference in New Issue
Block a user