mirror of
https://github.com/chatmail/core.git
synced 2026-05-02 04:46:29 +03:00
Get ChatId from Message
This commit is contained in:
18
src/job.rs
18
src/job.rs
@@ -218,11 +218,19 @@ impl Job {
|
|||||||
_ => {
|
_ => {
|
||||||
// If we do not retry, add an info message to the chat
|
// If we do not retry, add an info message to the chat
|
||||||
// Error 5.7.1 should definitely go here: Yandex sends 5.7.1 with a link when it thinks that the email is SPAM.
|
// Error 5.7.1 should definitely go here: Yandex sends 5.7.1 with a link when it thinks that the email is SPAM.
|
||||||
chat::add_info_msg(
|
match Message::load_from_db(context, MsgId::new(self.foreign_id)) {
|
||||||
context,
|
Ok(message) => chat::add_info_msg(
|
||||||
ChatId::new(self.foreign_id),
|
context,
|
||||||
err.to_string(),
|
message.chat_id,
|
||||||
);
|
err.to_string(),
|
||||||
|
),
|
||||||
|
Err(e) => warn!(
|
||||||
|
context,
|
||||||
|
"couldn't load chat_id to inform user about SMTP error: {}",
|
||||||
|
e
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
Status::Finished(Err(format_err!("Permanent SMTP error: {}", err)))
|
Status::Finished(Err(format_err!("Permanent SMTP error: {}", err)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user