mirror of
https://github.com/chatmail/core.git
synced 2026-04-24 08:56:29 +03:00
Return a Result<Option<Message>> for get_draft
The function can fail, so we need to still have an error return as well as a no-draft return. Add tests.
This commit is contained in:
@@ -663,7 +663,7 @@ pub unsafe fn dc_cmdline(context: &Context, line: &str) -> Result<(), failure::E
|
||||
},
|
||||
);
|
||||
log_msglist(context, &msglist)?;
|
||||
if let Ok(draft) = chat::get_draft(context, sel_chat.get_id()) {
|
||||
if let Some(draft) = chat::get_draft(context, sel_chat.get_id())? {
|
||||
log_msg(context, "Draft", &draft);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user