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:
Simon Laux
2023-01-09 22:12:33 +01:00
committed by GitHub
parent 0e849609f4
commit 07f2e28eca
2 changed files with 2 additions and 1 deletions

View File

@@ -1416,6 +1416,7 @@ pub(crate) async fn update_last_seen(
)
.await?
> 0
&& timestamp > time() - SEEN_RECENTLY_SECONDS
{
context.interrupt_recently_seen(contact_id, timestamp).await;
}