mirror of
https://github.com/chatmail/core.git
synced 2026-10-02 11:10:25 +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.
|
/// Returns `true` if this contact was not seen for a long time.
|
||||||
#[expect(clippy::arithmetic_side_effects)]
|
#[expect(clippy::arithmetic_side_effects)]
|
||||||
pub fn is_stale(&self) -> bool {
|
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
|
time() - self.last_seen > CONTACT_STALE_SECONDS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user