. (#109)
This commit is contained in:
@@ -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();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user