Support for joining New Groups via invite links
This commit is contained in:
parent
c0510b08a5
commit
a48b3e381e
41 changed files with 2532 additions and 381 deletions
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');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue