Skip to content

Commit

Permalink
Add AdminTakeDispute initial logic
Browse files Browse the repository at this point in the history
  • Loading branch information
grunch committed Oct 27, 2023
1 parent a9c87be commit 20924df
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ uuid = { version = "1.3.0", features = [
"serde",
] }
reqwest = { version = "0.11", features = ["json"] }
mostro-core = "0.3.10"
mostro-core = "0.3.11"
tracing = "0.1.37"
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
config = "0.13.3"
Expand Down
3 changes: 3 additions & 0 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ pub async fn run(
)
.await?;
}
Action::AdminTakeDispute => {
println!("AdminTakeDispute: {:#?}", msg);
}
_ => todo!(),
}
}
Expand Down
9 changes: 3 additions & 6 deletions src/app/dispute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,10 @@ pub async fn dispute_action(
let message = message.as_json()?;
let counterpart_pubkey = XOnlyPublicKey::from_bech32(counterpart)?;
send_dm(client, my_keys, &counterpart_pubkey, message).await?;
// We create a tag to show status of the dispute
let tags = vec![("s".to_string(), dispute.status.to_string())];
// nip33 kind with dispute id as identifier
let event = new_event(
my_keys,
"".to_string(),
dispute.id.to_string(),
([]).to_vec(),
)?;
let event = new_event(my_keys, "".to_string(), dispute.id.to_string(), tags)?;
info!("Dispute event to be published: {event:#?}");
client.send_event(event).await?;

Expand Down

0 comments on commit 20924df

Please sign in to comment.