From: Michael D. Lowis Date: Fri, 27 Aug 2021 14:50:47 +0000 (+0000) Subject: fixed bug preventing download and parsing of public keys from server X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=c05093b3a3e2b5e53525ee6fca1cab504dc0f9fc;p=proto%2Fachat.git fixed bug preventing download and parsing of public keys from server --- diff --git a/static/client.js b/static/client.js index c7406c9..166551e 100644 --- a/static/client.js +++ b/static/client.js @@ -176,7 +176,7 @@ const Client = ((state = {keys: {}, logs: {}})=>({ addContact: (name)=>{ Client.getFile('./keys/' + name).then((key)=>{ - key.split("\n").forEach(async (key)=>{ + key.trim().split("\n").forEach(async (key)=>{ await Crypto.importPublicKeys(name, key.split(" ").slice(-1)[0]); }) contact.appendChild(L('OPTION', { value: name }, name));