feat: better error for quoting a message from another chat

This commit is contained in:
link2xt
2025-05-24 03:04:10 +00:00
committed by l
parent 806b437209
commit b9667aae6b

View File

@@ -2943,7 +2943,10 @@ async fn prepare_send_msg(
if chat.typ != Chattype::Single && !context.get_config_bool(Config::Bot).await? {
if let Some(quoted_message) = msg.quoted_message(context).await? {
if quoted_message.chat_id != chat_id {
bail!("Bad quote reply");
bail!(
"Quote of message from {} cannot be sent to {chat_id}",
quoted_message.chat_id
);
}
}
}