diff options
Diffstat (limited to 'public/scripts/chat.js')
-rw-r--r-- | public/scripts/chat.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/public/scripts/chat.js b/public/scripts/chat.js index e81bd44..01377bf 100644 --- a/public/scripts/chat.js +++ b/public/scripts/chat.js @@ -8,12 +8,12 @@ const peerId = nanoid(); // setup encryption (async () => { - if (localStorage.getItem('database') === 'success' && encryption.setupConn() && await encryption.check()) { + encryption.setup(); + if (localStorage.getItem('database') === 'success' && await encryption.check()) { // TODO: Ask for passphrase chat(); } else { console.log('[LOG] No existing keys found! Generating...'); - encryption.setup(); (async () => await encryption.generate(peerId, 'supersecure').then(() => chat()))() } })(); |