mirror of
https://github.com/chatmail/core.git
synced 2026-10-03 03:30:36 +03:00
docs: clarify ChatId::do_set_draft() docs
Related: - https://github.com/chatmail/core/pull/6212. - https://github.com/chatmail/core/pull/2887.
This commit is contained in:
+8
-1
@@ -777,7 +777,14 @@ SELECT id, rfc724_mid, pre_rfc724_mid, timestamp, ?, 1 FROM msgs WHERE chat_id=?
|
||||
}
|
||||
|
||||
/// Set provided message as draft message for specified chat.
|
||||
/// Returns true if the draft was added or updated in place.
|
||||
///
|
||||
/// If there is an existing draft message,
|
||||
/// this function tries to update it instead of creating a new one,
|
||||
/// thus preserving the ID and possible WebXDC status updates
|
||||
/// associated with the draft message.
|
||||
///
|
||||
/// Returns `false` if the existing draft is already at the state
|
||||
/// that the caller tried to set it to, so it was unchanged.
|
||||
async fn do_set_draft(self, context: &Context, msg: &mut Message) -> Result<bool> {
|
||||
match msg.viewtype {
|
||||
Viewtype::Unknown => bail!("Can not set draft of unknown type."),
|
||||
|
||||
Reference in New Issue
Block a user