feat: add MsgDeleted event

This commit is contained in:
link2xt
2023-06-05 21:41:53 +00:00
parent 9be871ccf6
commit 33a014eea4
7 changed files with 59 additions and 2 deletions

View File

@@ -1431,6 +1431,11 @@ pub async fn delete_msgs(context: &Context, msg_ids: &[MsgId]) -> Result<()> {
.await
.with_context(|| format!("Unable to trash message {msg_id}"))?;
context.emit_event(EventType::MsgDeleted {
chat_id: msg.chat_id,
msg_id,
});
if msg.viewtype == Viewtype::Webxdc {
context.emit_event(EventType::WebxdcInstanceDeleted { msg_id });
}