block sending to chats that do not support sending (normally, this should already be avoided in the ui)

This commit is contained in:
B. Petersen
2019-11-05 13:52:01 +01:00
committed by holger krekel
parent 49bf99588b
commit 5a11551b4d

View File

@@ -745,6 +745,7 @@ fn prepare_msg_common(context: &Context, chat_id: u32, msg: &mut Message) -> Res
unarchive(context, chat_id)?;
let mut chat = Chat::load_from_db(context, chat_id)?;
ensure!(chat.can_send(), "cannot send to chat #{}", chat_id);
// The OutPreparing state is set by dc_prepare_msg() before it
// calls this function and the message is left in the OutPreparing