mirror of
https://github.com/chatmail/core.git
synced 2026-05-20 23:36:30 +03:00
debug_logging: use Context.emit_event()
This commit is contained in:
@@ -7,7 +7,7 @@ use crate::{
|
|||||||
param::Param,
|
param::Param,
|
||||||
tools::time,
|
tools::time,
|
||||||
webxdc::StatusUpdateItem,
|
webxdc::StatusUpdateItem,
|
||||||
Event, EventType,
|
EventType,
|
||||||
};
|
};
|
||||||
use async_channel::{self as channel, Receiver, Sender};
|
use async_channel::{self as channel, Receiver, Sender};
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
@@ -72,12 +72,9 @@ pub async fn debug_logging_loop(context: &Context, events: Receiver<DebugEventLo
|
|||||||
eprintln!("Can't log event to webxdc status update: {err:#}");
|
eprintln!("Can't log event to webxdc status update: {err:#}");
|
||||||
}
|
}
|
||||||
Ok(serial) => {
|
Ok(serial) => {
|
||||||
context.events.emit(Event {
|
context.emit_event(EventType::WebxdcStatusUpdate {
|
||||||
id: context.id,
|
msg_id,
|
||||||
typ: EventType::WebxdcStatusUpdate {
|
status_update_serial: serial,
|
||||||
msg_id,
|
|
||||||
status_update_serial: serial,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user