mirror of
https://github.com/chatmail/core.git
synced 2026-09-22 04:58:47 +03:00
special contacts and unset last_seen are never stale
This commit is contained in:
@@ -737,6 +737,9 @@ impl Contact {
|
||||
/// Returns `true` if this contact was not seen for a long time.
|
||||
#[expect(clippy::arithmetic_side_effects)]
|
||||
pub fn is_stale(&self) -> bool {
|
||||
if self.last_seen == 0 || self.id <= ContactId::LAST_SPECIAL {
|
||||
return false;
|
||||
}
|
||||
time() - self.last_seen > CONTACT_STALE_SECONDS
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user