Skip to content

Commit

Permalink
fix: supply event directly to payload
Browse files Browse the repository at this point in the history
  • Loading branch information
dariusc93 committed Dec 23, 2024
1 parent 837e855 commit 7741fe9
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions extensions/warp-ipfs/src/store/message/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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?;

Expand Down Expand Up @@ -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?;

Expand Down

0 comments on commit 7741fe9

Please sign in to comment.