Don't peek-receipients/fetch-existing if this is a bot

This commit is contained in:
Hocuri
2020-10-19 15:58:55 +02:00
committed by holger krekel
parent dcc00075b0
commit 6c5eaaed2c

View File

@@ -627,6 +627,9 @@ impl Job {
/// Then, Fetch the last messages DC_FETCH_EXISTING_MSGS_COUNT emails from the server
/// and show them in the chat list.
async fn fetch_existing_msgs(&mut self, context: &Context, imap: &mut Imap) -> Status {
if context.get_config_bool(Config::Bot).await {
return Status::Finished(Ok(())); // Bots don't want those messages
}
if let Err(err) = imap.connect_configured(context).await {
warn!(context, "could not connect: {:?}", err);
return Status::RetryLater;