mirror of https://github.com/waku-org/js-waku.git
Fix filtering of own messages
This commit is contained in:
parent
f020aa7a8c
commit
2f2f89cf65
|
@ -144,7 +144,8 @@ async function handleDirectMessage(
|
||||||
console.log('Direct Message received:', wakuMsg);
|
console.log('Direct Message received:', wakuMsg);
|
||||||
if (!wakuMsg.payload) return;
|
if (!wakuMsg.payload) return;
|
||||||
const directMessage: DirectMessage = decode(wakuMsg.payload);
|
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);
|
const text = await decryptMessage(privateKey, directMessage);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue