mirror of
https://github.com/chatmail/core.git
synced 2026-05-20 15:26:30 +03:00
refactor(ratelimit): Return Duration from Ratelimit functions
- `Ratelimit` is rather a low-level Rust tool, so it should only use `Duration` and `SystemTime`. - Rename `Ratelimit::update_interval()` to `min_send_interval()`, the word "update" only occurs in `last_update`, but it's a private field.
This commit is contained in:
@@ -60,7 +60,7 @@ impl WebxdcMessageInfo {
|
||||
request_integration: _,
|
||||
internet_access,
|
||||
self_addr,
|
||||
send_update_interval,
|
||||
send_update_interval_ms,
|
||||
send_update_max_size,
|
||||
} = message.get_webxdc_info(context).await?;
|
||||
|
||||
@@ -72,7 +72,7 @@ impl WebxdcMessageInfo {
|
||||
source_code_url: maybe_empty_string_to_option(source_code_url),
|
||||
internet_access,
|
||||
self_addr,
|
||||
send_update_interval,
|
||||
send_update_interval: send_update_interval_ms,
|
||||
send_update_max_size,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user