From 7741fe9996ca6252cffc4615e2de1ab4a318bdf0 Mon Sep 17 00:00:00 2001 From: Darius Date: Mon, 23 Dec 2024 15:09:26 -0500 Subject: [PATCH] fix: supply event directly to payload --- extensions/warp-ipfs/src/store/message/task.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/extensions/warp-ipfs/src/store/message/task.rs b/extensions/warp-ipfs/src/store/message/task.rs index bdae073e2..c973d62cb 100644 --- a/extensions/warp-ipfs/src/store/message/task.rs +++ b/extensions/warp-ipfs/src/store/message/task.rs @@ -935,9 +935,8 @@ impl ConversationTask { let topic = self.document.exchange_topic(identity); - let bytes = ecdh_encrypt(keypair, Some(identity), serde_json::to_vec(&request)?)?; - - let payload = PayloadBuilder::new(keypair, bytes) + let payload = PayloadBuilder::new(keypair, request) + .add_recipient(identity)? .from_ipfs(&self.ipfs) .await?; @@ -3495,9 +3494,8 @@ async fn process_request_response_event( let topic = this.document.exchange_topic(&sender); - let bytes = ecdh_encrypt(keypair, Some(&sender), serde_json::to_vec(&response)?)?; - - let payload = PayloadBuilder::new(keypair, bytes) + let payload = PayloadBuilder::new(keypair, response) + .add_recipient(&sender)? .from_ipfs(&this.ipfs) .await?;