diff --git a/api/grpc/index.ts b/api/grpc/index.ts index 065259e..bce2ec9 100644 --- a/api/grpc/index.ts +++ b/api/grpc/index.ts @@ -16,7 +16,6 @@ async function parseAndVerifyPayload(data){ try { payload = JSON.parse(msg) if(payload) { - if(!sig) return payload // REMOVE THIS LINE (here for backward compat) const v = await verifyAscii(msg, sig) if(v && v.valid && v.pubkey) { payload.sender = payload.sender||{} diff --git a/api/helpers.ts b/api/helpers.ts index 59ba68f..13bd2e2 100644 --- a/api/helpers.ts +++ b/api/helpers.ts @@ -229,10 +229,10 @@ function newmsg(type, chat, sender, message){ ...chat.members && { members: chat.members }, }, message: message, - sender: { - pub_key: sender.publicKey, - // ...sender.contactKey && {contact_key: sender.contactKey} - } + // sender: { + // pub_key: sender.publicKey, + // // ...sender.contactKey && {contact_key: sender.contactKey} + // } } } @@ -240,7 +240,7 @@ function newkeyexchangemsg(type, sender){ return { type: type, sender: { - pub_key: sender.publicKey, + // pub_key: sender.publicKey, contact_key: sender.contactKey, ...sender.alias && {alias: sender.alias}, // ...sender.photoUrl && {photoUrl: sender.photoUrl} diff --git a/api/utils/lightning.ts b/api/utils/lightning.ts index 5f9b22e..13fb1af 100644 --- a/api/utils/lightning.ts +++ b/api/utils/lightning.ts @@ -140,8 +140,8 @@ async function keysendMessage(opts) { return reject('string plz') } // SIGN HERE and append sig - // const sig = await signAscii(opts.data) - // opts.data = opts.data + sig + const sig = await signAscii(opts.data) + opts.data = opts.data + sig if(opts.data.length