Returns ID of the draft message, if there is one.
(self, context: &Context)
| 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>> { |
no test coverage detected