Skip to content

Commit b9667aa

Browse files
committed
feat: better error for quoting a message from another chat
1 parent 806b437 commit b9667aa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/chat.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2943,7 +2943,10 @@ async fn prepare_send_msg(
29432943
if chat.typ != Chattype::Single && !context.get_config_bool(Config::Bot).await? {
29442944
if let Some(quoted_message) = msg.quoted_message(context).await? {
29452945
if quoted_message.chat_id != chat_id {
2946-
bail!("Bad quote reply");
2946+
bail!(
2947+
"Quote of message from {} cannot be sent to {chat_id}",
2948+
quoted_message.chat_id
2949+
);
29472950
}
29482951
}
29492952
}

0 commit comments

Comments
 (0)