2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Improve typing status sending.

This commit is contained in:
John Preston
2020-10-26 16:27:01 +03:00
parent 53c308c24b
commit 48dad5f477
2 changed files with 29 additions and 12 deletions

View File

@@ -152,7 +152,14 @@ bool SendProgressManager::skipRequest(const Key &key) const {
return true;
}
const auto recently = base::unixtime::now() - kSendTypingsToOfflineFor;
return !Data::OnlineTextActive(user->onlineTill, recently);
const auto online = user->onlineTill;
if (online == -2) { // last seen recently
return false;
} else if (online < 0) {
return (-online < recently);
} else {
return (online < recently);
}
}
void SendProgressManager::done(