chain_width to 50

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-04-22 04:42:26 +00:00
parent 9b658d86b2
commit 76509830e6
190 changed files with 3469 additions and 930 deletions

View File

@@ -84,8 +84,13 @@ impl Data {
let now = utils::millis_since_unix_epoch();
let last_last_active_ts = match last_presence {
| Err(_) => 0,
| Ok((_, ref presence)) =>
now.saturating_sub(presence.content.last_active_ago.unwrap_or_default().into()),
| Ok((_, ref presence)) => now.saturating_sub(
presence
.content
.last_active_ago
.unwrap_or_default()
.into(),
),
};
let last_active_ts = match last_active_ago {
@@ -118,7 +123,8 @@ impl Data {
let count = self.services.globals.next_count()?;
let key = presenceid_key(count, user_id);
self.presenceid_presence.raw_put(key, Json(presence));
self.presenceid_presence
.raw_put(key, Json(presence));
self.userid_presenceid.raw_put(user_id, count);
if let Ok((last_count, _)) = last_presence {

View File

@@ -110,8 +110,11 @@ impl Service {
let last_last_active_ago = match last_presence {
| Err(_) => 0_u64,
| Ok((_, ref presence)) =>
presence.content.last_active_ago.unwrap_or_default().into(),
| Ok((_, ref presence)) => presence
.content
.last_active_ago
.unwrap_or_default()
.into(),
};
if !state_changed && last_last_active_ago < REFRESH_TIMEOUT {
@@ -151,8 +154,16 @@ impl Service {
&& user_id != self.services.globals.server_user
{
let timeout = match presence_state {
| PresenceState::Online => self.services.server.config.presence_idle_timeout_s,
| _ => self.services.server.config.presence_offline_timeout_s,
| PresenceState::Online =>
self.services
.server
.config
.presence_idle_timeout_s,
| _ =>
self.services
.server
.config
.presence_offline_timeout_s,
};
self.timer_channel