feat: detect XCHATMAIL capability and expose it as is_chatmail config

This commit is contained in:
link2xt
2024-05-14 19:43:44 +00:00
parent 07ceabdf85
commit eec1062619
8 changed files with 44 additions and 12 deletions

View File

@@ -466,6 +466,12 @@ pub async fn convert_folder_meaning(
}
async fn inbox_fetch_idle(ctx: &Context, imap: &mut Imap, mut session: Session) -> Result<Session> {
ctx.set_config_internal(
Config::IsChatmail,
crate::config::from_bool(session.is_chatmail()),
)
.await?;
// Update quota no more than once a minute.
let quota_needs_update = {
let quota = ctx.quota.read().await;