wip
Some checks failed
Rust / build (ubuntu-latest, stable) (push) Failing after 1m46s

This commit is contained in:
2026-02-17 13:23:43 +07:00
parent 1d8e3724a8
commit 8026a4f5a5
9 changed files with 145 additions and 196 deletions

View File

@@ -144,6 +144,7 @@ impl PersonRegistry {
/// Handle nostr notifications
async fn handle_notifications(client: &Client, tx: &flume::Sender<Dispatch>) {
let mut notifications = client.notifications();
let mut processed: HashSet<EventId> = HashSet::new();
while let Some(notification) = notifications.next().await {
let ClientNotification::Message { message, .. } = notification else {
@@ -152,6 +153,11 @@ impl PersonRegistry {
};
if let RelayMessage::Event { event, .. } = message {
// Skip if the event has already been processed
if !processed.insert(event.id) {
continue;
}
match event.kind {
Kind::Metadata => {
let metadata = Metadata::from_json(&event.content).unwrap_or_default();