fix(presence): fix configuration values for presence status

This commit is contained in:
Jakub Kubík 2022-11-21 22:56:58 +01:00
parent 4d22cb502e
commit 2eb5907d95
No known key found for this signature in database
GPG key ID: D3A0D5D60F3A173F

View file

@ -391,9 +391,9 @@ fn parse_presence_event(bytes: &[u8], presence_timestamp: u64) -> Result<Presenc
fn determine_presence_state(last_active_ago: u64) -> PresenceState {
let globals = &services().globals;
return if last_active_ago < globals.presence_idle_timeout() {
return if last_active_ago < globals.presence_idle_timeout() * 1000 {
PresenceState::Online
} else if last_active_ago < globals.presence_offline_timeout() {
} else if last_active_ago < globals.presence_offline_timeout() * 1000 {
PresenceState::Unavailable
} else {
PresenceState::Offline