Handle annotations omit correctly

pull/517/head
Ryan Tharp 6 years ago committed by GitHub
parent b62801bc2a
commit a976388315
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -559,7 +559,9 @@ class LokiPublicChannelAPI {
// try to verify signature
const { sig, sigver } = noteValue;
const annoCopy = _.omit(adnMessage.annotations, ['value.sig', 'value.sigver']);
const annoCopy = [ ...adnMessage.annotations ];
delete annoCopy[0].value.sig;
delete annoCopy[0].value.sigver;
const verifyObj = {
text: adnMessage.text,
version: sigver,
@ -602,6 +604,9 @@ class LokiPublicChannelAPI {
// we now only accept valid messages into the public chat
return false;
}
// any error should cause problem
log.error(`Unhandled message signature validation error ${e.message}`);
return false;
}
return {

Loading…
Cancel
Save