wip
Some checks failed
Rust / build (ubuntu-latest, stable) (push) Failing after 1m46s
Some checks failed
Rust / build (ubuntu-latest, stable) (push) Failing after 1m46s
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user