MCPcopy Create free account
hub / github.com/chatmail/core / get_draft_msg_id

Method get_draft_msg_id

src/chat.rs:740–749  ·  view source on GitHub ↗

Returns ID of the draft message, if there is one.

(self, context: &Context)

Source from the content-addressed store, hash-verified

738
739 /// Returns ID of the draft message, if there is one.
740 async fn get_draft_msg_id(self, context: &Context) -> Result<Option<MsgId>> {
741 let msg_id: Option<MsgId> = context
742 .sql
743 .query_get_value(
744 "SELECT id FROM msgs WHERE chat_id=? AND state=?;",
745 (self, MessageState::OutDraft),
746 )
747 .await?;
748 Ok(msg_id)
749 }
750
751 /// Returns draft message, if there is one.
752 pub async fn get_draft(self, context: &Context) -> Result<Option<Message>> {

Callers 2

set_draftMethod · 0.80
get_draftMethod · 0.80

Calls 1

query_get_valueMethod · 0.80

Tested by

no test coverage detected