This commit is contained in:
reya
2025-08-06 07:10:00 +07:00
committed by GitHub
parent bd2b72a57a
commit af74a4ed23

View File

@@ -394,9 +394,11 @@ async fn handle_nostr_notifications(
match event.kind { match event.kind {
Kind::GiftWrap => { 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 { if *subscription_id == new_messages {
let event = event.as_ref(); log::info!("receive a new message: {:?}", event.id);
_ = try_unwrap_event(signal_tx, mta_tx, event, false).await; try_unwrap_event(signal_tx, mta_tx, &event, true).await;
} else { } else {
event_tx.send(event.into_owned()).await.ok(); event_tx.send(event.into_owned()).await.ok();
} }