Skip to content

Commit

Permalink
Introduced nostr-sdk 0.25 and options for a variable reconnect time b…
Browse files Browse the repository at this point in the history
…ased on tentative/success difference (#148)
  • Loading branch information
arkanoider authored Nov 23, 2023
1 parent d56dab5 commit eaa6a1b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ chrono = "0.4.23"
easy-hasher = "2.2.1"
lightning-invoice = "0.25.0"
log = "0.4.17"
nostr-sdk = "0.24.0"
nostr-sdk = "0.25.0"
serde = { version = "1.0.149" }
serde_json = "1.0.89"
sqlx = { version = "0.6.2", features = [
Expand Down
2 changes: 1 addition & 1 deletion src/app/rate_user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub async fn get_counterpart_reputation(
// Request NIP33 of the counterparts
// TODO: filter by data_label=rating generic_tag
let filters = Filter::new()
.author(my_keys.public_key().to_string())
.author(my_keys.public_key())
.kind(Kind::Custom(NOSTR_REPLACEABLE_EVENT_KIND))
.identifier(user.to_string());

Expand Down
3 changes: 2 additions & 1 deletion src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ pub async fn connect_nostr() -> Result<Client> {

// Add relays
for r in relays.into_iter() {
client.add_relay(r, None).await?;
let opts = RelayOptions::new();
client.add_relay_with_opts(r, None, opts).await?;
}

// Connect to relays and keep connection alive
Expand Down

0 comments on commit eaa6a1b

Please sign in to comment.