From 2f2f89cf6591d2b7e9abcbe47e420df0a9d3c026 Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Fri, 2 Jul 2021 10:56:23 +1000 Subject: [PATCH] Fix filtering of own messages --- examples/eth-dm/src/InitWaku.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/eth-dm/src/InitWaku.tsx b/examples/eth-dm/src/InitWaku.tsx index e01f12e85d..e19991bb68 100644 --- a/examples/eth-dm/src/InitWaku.tsx +++ b/examples/eth-dm/src/InitWaku.tsx @@ -144,7 +144,8 @@ async function handleDirectMessage( console.log('Direct Message received:', wakuMsg); if (!wakuMsg.payload) return; const directMessage: DirectMessage = decode(wakuMsg.payload); - if (directMessage.toAddress !== address) return; + // Do not return our own messages + if (directMessage.toAddress === address) return; const text = await decryptMessage(privateKey, directMessage);