From d79984fdba57c8e89400fc2a47958d49e0ed9645 Mon Sep 17 00:00:00 2001 From: "fryorcraken.eth" Date: Wed, 31 Aug 2022 14:22:06 +1000 Subject: [PATCH] fix: do not discard messages with no payload While they do not need to be decoded, they might still be used. e.g. timestamp, network connectivity, etc. --- src/lib/waku_message/index.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/lib/waku_message/index.ts b/src/lib/waku_message/index.ts index 29493e6000..6bf6851136 100644 --- a/src/lib/waku_message/index.ts +++ b/src/lib/waku_message/index.ts @@ -151,15 +151,11 @@ export class WakuMessage { protoBuf: proto.WakuMessage, decryptionParams?: DecryptionParams[] ): Promise { - if (protoBuf.payload === undefined) { - dbg("Payload is undefined"); - return; - } const payload = protoBuf.payload; let signaturePublicKey; let signature; - if (protoBuf.version === 1 && protoBuf.payload) { + if (protoBuf.version === 1 && payload) { if (decryptionParams === undefined) { dbg("Payload is encrypted but no private keys have been provided."); return;