Merge pull request #189 from waku-org/danisharora/ephemeral

feat(eth-pm): `ephemeral: true` to relay messages
This commit is contained in:
Danish Arora 2023-01-20 17:25:56 +05:30 committed by GitHub
commit 6aa6cdfeb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -49,7 +49,9 @@ export default function BroadcastPublicKey({
const publicKeyMessageEncoder = createEncoder(
PublicKeyContentTopic,
PublicKeyMessageEncryptionKey
PublicKeyMessageEncryptionKey,
undefined,
true
);
await waku.relay.send(publicKeyMessageEncoder, { payload });

View File

@ -118,7 +118,12 @@ async function sendMessage(
});
const payload = privateMessage.encode();
const encoder = createEncoder(PrivateMessageContentTopic, recipientPublicKey);
const encoder = createEncoder(
PrivateMessageContentTopic,
recipientPublicKey,
undefined,
true
);
console.log("pushing");
const res = await waku.relay.send(encoder, { payload });