Divide speaking status and background noise.

This commit is contained in:
John Preston
2020-12-15 14:16:44 +04:00
parent 7f7e7b94d6
commit 15620b5c2d
7 changed files with 139 additions and 93 deletions
+8 -2
View File
@@ -245,7 +245,10 @@ Updates::Updates(not_null<Main::Session*> session)
for (const auto [userId, when] : *users) {
call->applyActiveUpdate(
userId,
when,
Data::LastSpokeTimes{
.anything = when,
.voice = when
},
peer->owner().userLoaded(userId));
}
}
@@ -928,7 +931,10 @@ void Updates::handleSendActionUpdate(
const auto call = peer->groupCall();
const auto now = crl::now();
if (call) {
call->applyActiveUpdate(userId, now, user);
call->applyActiveUpdate(
userId,
Data::LastSpokeTimes{ .anything = now, .voice = now },
user);
} else {
const auto chat = peer->asChat();
const auto channel = peer->asChannel();