chore: update nostr sdk
This commit is contained in:
393
Cargo.lock
generated
393
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -163,7 +163,7 @@ impl ChatRegistry {
|
||||
continue;
|
||||
};
|
||||
|
||||
match message {
|
||||
match *message {
|
||||
RelayMessage::Event { event, .. } => {
|
||||
// Keep track of which relays have seen this event
|
||||
{
|
||||
|
||||
@@ -201,15 +201,12 @@ impl ChatPanel {
|
||||
let mut notifications = client.notifications();
|
||||
|
||||
while let Some(notification) = notifications.next().await {
|
||||
if let ClientNotification::Message {
|
||||
message:
|
||||
RelayMessage::Ok {
|
||||
if let ClientNotification::Message { message, relay_url } = notification
|
||||
&& let RelayMessage::Ok {
|
||||
event_id,
|
||||
status,
|
||||
message,
|
||||
},
|
||||
relay_url,
|
||||
} = notification
|
||||
} = *message
|
||||
{
|
||||
let sent_ids = sent_ids.read().await;
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ fn main() {
|
||||
cx.set_menus(vec![Menu {
|
||||
name: "Coop".into(),
|
||||
items: vec![MenuItem::action("Quit", Quit)],
|
||||
disabled: false,
|
||||
}]);
|
||||
|
||||
// Set up the window bounds
|
||||
|
||||
@@ -149,10 +149,8 @@ impl DeviceRegistry {
|
||||
let mut processed_events = HashSet::new();
|
||||
|
||||
while let Some(notification) = notifications.next().await {
|
||||
if let ClientNotification::Message {
|
||||
message: RelayMessage::Event { event, .. },
|
||||
..
|
||||
} = notification
|
||||
if let ClientNotification::Message { message, .. } = notification
|
||||
&& let RelayMessage::Event { event, .. } = *message
|
||||
{
|
||||
if !processed_events.insert(event.id) {
|
||||
// Skip if the event has already been processed
|
||||
|
||||
@@ -135,7 +135,7 @@ impl PersonRegistry {
|
||||
continue;
|
||||
};
|
||||
|
||||
if let RelayMessage::Event { event, .. } = message {
|
||||
if let RelayMessage::Event { event, .. } = *message {
|
||||
// Skip if the event has already been processed
|
||||
if !processed.insert(event.id) {
|
||||
continue;
|
||||
|
||||
@@ -100,7 +100,7 @@ impl RelayAuth {
|
||||
|
||||
while let Some(notification) = notifications.next().await {
|
||||
if let ClientNotification::Message { relay_url, message } = notification {
|
||||
match message {
|
||||
match *message {
|
||||
RelayMessage::Auth { challenge } => {
|
||||
if challenges.insert(challenge.clone()) {
|
||||
let request = Arc::new(AuthRequest::new(challenge, relay_url));
|
||||
@@ -221,9 +221,8 @@ impl RelayAuth {
|
||||
|
||||
while let Some(notification) = notifications.next().await {
|
||||
match notification {
|
||||
RelayNotification::Message {
|
||||
message: RelayMessage::Ok { event_id, .. },
|
||||
} => {
|
||||
RelayNotification::Message { message } => {
|
||||
if let RelayMessage::Ok { event_id, .. } = *message {
|
||||
if id != event_id {
|
||||
continue;
|
||||
}
|
||||
@@ -247,6 +246,7 @@ impl RelayAuth {
|
||||
|
||||
return Ok(());
|
||||
}
|
||||
}
|
||||
RelayNotification::AuthenticationFailed => break,
|
||||
_ => {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user