Merge pull request #517 from deltachat/fix_get_draft

Fix get_draft to just return null and not produce errors if there's no
This commit is contained in:
Simon Laux
2019-09-14 23:39:09 +02:00
committed by GitHub
3 changed files with 69 additions and 13 deletions

View File

@@ -659,7 +659,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);
}