mirror of
https://github.com/chatmail/core.git
synced 2026-04-28 02:46:29 +03:00
fix: only send contact changed event for recently seen if it is relevant (#3938)
(no events for contacts that are already offline again) This dramatically speeds up replay after backup import on desktop.
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
### API-Changes
|
### API-Changes
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
|
- fix: only send contact changed event for recently seen if it is relevant (not too old to matter) #3938
|
||||||
|
|
||||||
## 1.105.0
|
## 1.105.0
|
||||||
|
|
||||||
|
|||||||
@@ -1416,6 +1416,7 @@ pub(crate) async fn update_last_seen(
|
|||||||
)
|
)
|
||||||
.await?
|
.await?
|
||||||
> 0
|
> 0
|
||||||
|
&& timestamp > time() - SEEN_RECENTLY_SECONDS
|
||||||
{
|
{
|
||||||
context.interrupt_recently_seen(contact_id, timestamp).await;
|
context.interrupt_recently_seen(contact_id, timestamp).await;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user