mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 17:36:29 +03:00
block sending to chats that do not support sending (normally, this should already be avoided in the ui)
This commit is contained in:
committed by
holger krekel
parent
49bf99588b
commit
5a11551b4d
@@ -745,6 +745,7 @@ fn prepare_msg_common(context: &Context, chat_id: u32, msg: &mut Message) -> Res
|
|||||||
unarchive(context, chat_id)?;
|
unarchive(context, chat_id)?;
|
||||||
|
|
||||||
let mut chat = Chat::load_from_db(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
|
// The OutPreparing state is set by dc_prepare_msg() before it
|
||||||
// calls this function and the message is left in the OutPreparing
|
// calls this function and the message is left in the OutPreparing
|
||||||
|
|||||||
Reference in New Issue
Block a user