fix FFI-behaviour: return default empty messages when asked for special ones

This commit is contained in:
holger krekel
2019-10-30 18:54:42 +01:00
parent 9cdfc3409d
commit b0ccbc36d9
4 changed files with 26 additions and 4 deletions

View File

@@ -655,8 +655,6 @@ impl<'a> MimeFactory<'a> {
}
pub fn load_msg(context: &Context, msg_id: MsgId) -> Result<MimeFactory, Error> {
ensure!(!msg_id.is_special(), "Invalid chat id");
let msg = Message::load_from_db(context, msg_id)?;
let chat = Chat::load_from_db(context, msg.chat_id)?;
let mut factory = MimeFactory::new(context, msg);