mirror of
https://github.com/chatmail/core.git
synced 2026-05-06 06:46:35 +03:00
feat: add send_edit_request to jsonrpc
This commit is contained in:
@@ -2004,6 +2004,16 @@ impl CommandApi {
|
|||||||
Ok(msg_id)
|
Ok(msg_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async fn send_edit_request(
|
||||||
|
&self,
|
||||||
|
account_id: u32,
|
||||||
|
msg_id: u32,
|
||||||
|
new_text: String,
|
||||||
|
) -> Result<()> {
|
||||||
|
let ctx = self.get_context(account_id).await?;
|
||||||
|
chat::send_edit_request(&ctx, MsgId::new(msg_id), new_text).await
|
||||||
|
}
|
||||||
|
|
||||||
/// Checks if messages can be sent to a given chat.
|
/// Checks if messages can be sent to a given chat.
|
||||||
async fn can_send(&self, account_id: u32, chat_id: u32) -> Result<bool> {
|
async fn can_send(&self, account_id: u32, chat_id: u32) -> Result<bool> {
|
||||||
let ctx = self.get_context(account_id).await?;
|
let ctx = self.get_context(account_id).await?;
|
||||||
|
|||||||
Reference in New Issue
Block a user