diff --git a/services/gunDB/contact-api/events.js b/services/gunDB/contact-api/events.js index b99d9e7f..42991976 100644 --- a/services/gunDB/contact-api/events.js +++ b/services/gunDB/contact-api/events.js @@ -343,6 +343,11 @@ const processOutgoings = async () => { return } + if (!Schema.isPartialOutgoing(out)) { + // incomplete data + return + } + if (typeof currentOutgoings[id] === 'undefined') { // We disable this rule because we are awaiting the result of the whole // for each AND each callback looks only at one single ID @@ -364,6 +369,10 @@ const processOutgoings = async () => { await Utils.asyncForEach( Object.entries(out.messages), async ([msgID, msg]) => { + if (!Schema.isMessage(msg)) { + // incomplete data + return + } if (!currentOut.messages[msgID]) { let decryptedBody = '' if (msg.body === Actions.INITIAL_MSG) {