add device message if quota is exceeding (#2621)

* resultify update_recent_quota()

* add a device-message if quota exceeds QUOTA_WARN_THRESHOLD_PERCENTAGE

* check if a quota warning should be added during housekeeping, this is at least once a day

* dc_get_config("quota_exceeding") is useful for bots

* make clippy happy

* reword QuotaExceedingMsgBody message

* avoid lots of warnings if quota jitters around the warning threshold

* allow clippy::assertions_on_constants

these constants depend on each other, it makes sense to check that they are not changed in an incompatible way
This commit is contained in:
bjoern
2021-08-26 15:31:25 +02:00
committed by GitHub
parent 3aa2b57ac1
commit 71e0493c4a
7 changed files with 136 additions and 5 deletions

View File

@@ -598,6 +598,8 @@ pub async fn housekeeping(context: &Context) -> Result<()> {
);
}
context.schedule_quota_update().await;
if let Err(e) = context
.set_config(Config::LastHousekeeping, Some(&time().to_string()))
.await