From af74a4ed23a4f344cb29bf904a12c4af1456d5b2 Mon Sep 17 00:00:00 2001 From: reya <123083837+reyamir@users.noreply.github.com> Date: Wed, 6 Aug 2025 07:10:00 +0700 Subject: [PATCH] . (#109) --- crates/coop/src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/coop/src/main.rs b/crates/coop/src/main.rs index da5b335..db4f140 100644 --- a/crates/coop/src/main.rs +++ b/crates/coop/src/main.rs @@ -394,9 +394,11 @@ async fn handle_nostr_notifications( match event.kind { Kind::GiftWrap => { + // Process to unwrap directly if event come from new messages subscription + // Otherwise, send the event to the event_tx channel if *subscription_id == new_messages { - let event = event.as_ref(); - _ = try_unwrap_event(signal_tx, mta_tx, event, false).await; + log::info!("receive a new message: {:?}", event.id); + try_unwrap_event(signal_tx, mta_tx, &event, true).await; } else { event_tx.send(event.into_owned()).await.ok(); }