diff --git a/main.js b/main.js index 285135e..e106693 100644 --- a/main.js +++ b/main.js @@ -228,7 +228,10 @@ async function handlePPPPPUri(ev, uri) { setTimeout(handlePPPPPUri, 100, null, uri) return } - if (!uri.startsWith('ppppp://')) return console.log('Not a ppppp:// URI', uri) + if (uri.startsWith("http:") || uri.startsWith("https://")) { + uri = decodeURIComponent(uri.split('/invite#')[1]) + } + if (!uri.startsWith('ppppp://')) return console.log('Not a ppppp invite URI', uri) const commands = peer.invite.parse(uri) for (const command of commands) { console.log('Executing command', JSON.stringify(command)) diff --git a/src/JoinModal.js b/src/JoinModal.js index 467a081..a340884 100644 --- a/src/JoinModal.js +++ b/src/JoinModal.js @@ -16,10 +16,10 @@ function JoinModal({ isOpen, onClose }) { return ( - Insert here the ppppp:// invite code you received from your friend. + Insert here the ppppp:// or http(s):// invite code you received from your friend.