mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 09:26:29 +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:
@@ -66,7 +66,7 @@ impl WebxdcMessageInfo {
|
||||
self_addr,
|
||||
is_app_sender,
|
||||
is_broadcast,
|
||||
send_update_interval,
|
||||
send_update_interval_ms,
|
||||
send_update_max_size,
|
||||
} = message.get_webxdc_info(context).await?;
|
||||
|
||||
@@ -80,7 +80,7 @@ impl WebxdcMessageInfo {
|
||||
self_addr,
|
||||
is_app_sender,
|
||||
is_broadcast,
|
||||
send_update_interval,
|
||||
send_update_interval: send_update_interval_ms,
|
||||
send_update_max_size,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user