]> git.mdlowis.com Git - proto/achat.git/commitdiff
fixed bug preventing download and parsing of public keys from server master
authorMichael D. Lowis <mike@mdlowis.com>
Fri, 27 Aug 2021 14:50:47 +0000 (14:50 +0000)
committerMichael D. Lowis <mike@mdlowis.com>
Fri, 27 Aug 2021 14:50:47 +0000 (14:50 +0000)
static/client.js

index c7406c90adbe4c42a18dcecd00e32371424664bf..166551e5b66f86fbeed0ca9dd2bbf784f0e60769 100644 (file)
@@ -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));