refactor(imap): pass Imap Session to update_recent_quota()

This commit is contained in:
link2xt
2024-02-28 22:30:19 +00:00
parent 2a0a05d03c
commit f8f0ca08da
3 changed files with 9 additions and 12 deletions

View File

@@ -408,8 +408,10 @@ async fn inbox_loop(
};
if quota_needs_update {
if let Err(err) = ctx.update_recent_quota(&mut connection).await {
warn!(ctx, "Failed to update quota: {:#}.", err);
if let Some(session) = connection.session.as_mut() {
if let Err(err) = ctx.update_recent_quota(session).await {
warn!(ctx, "Failed to update quota: {:#}.", err);
}
}
}
}