feat: save messages API in JSON RPC (#6554)

relates to https://github.com/deltachat/deltachat-desktop/issues/4596
This commit is contained in:
Nico de Haen
2025-02-18 16:41:04 +01:00
committed by GitHub
parent 0f449cc7eb
commit e0dfba87b6
2 changed files with 20 additions and 0 deletions

View File

@@ -1305,6 +1305,12 @@ impl CommandApi {
Ok(results)
}
async fn save_msgs(&self, account_id: u32, message_ids: Vec<u32>) -> Result<()> {
let ctx = self.get_context(account_id).await?;
let message_ids: Vec<MsgId> = message_ids.into_iter().map(MsgId::new).collect();
chat::save_msgs(&ctx, &message_ids).await
}
// ---------------------------------------------
// contact
// ---------------------------------------------