fix: hide connectivity HTML quota if not supported

This also solves the problem with the fact that
it's not clear from the resulting HTML
that this error message is referring to quota and not something else.
See https://github.com/chatmail/core/pull/8130.
This commit is contained in:
WofWca
2026-05-15 12:07:46 +04:00
parent a017663be5
commit 6d0d9fe0b2
4 changed files with 24 additions and 19 deletions

View File

@@ -418,7 +418,11 @@ impl Context {
};
match &quota.recent {
Err(e) => {
ret += &escaper::encode_minimal(&e.to_string());
// If not supported by the provider,
// just skip the "quota" section.
if !matches!(e, crate::quota::Error::NotSupportedByProvider) {
ret += &escaper::encode_minimal(&e.to_string());
}
}
Ok(quota) => {
if quota.is_empty() {