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

Update tgcalls.

This commit is contained in:
John Preston
2021-03-08 11:57:00 +04:00
parent cfd16c6f67
commit f41abe0a28
5 changed files with 140 additions and 27 deletions

View File

@@ -378,6 +378,16 @@ void GroupCall::applyLastSpoke(
}
}
void GroupCall::resolveParticipants(const base::flat_set<uint32> &ssrcs) {
if (ssrcs.empty()) {
return;
}
for (const auto ssrc : ssrcs) {
_unknownSpokenSsrcs.emplace(ssrc, LastSpokeTimes());
}
requestUnknownParticipants();
}
void GroupCall::applyActiveUpdate(
PeerId participantPeerId,
LastSpokeTimes when,
@@ -531,7 +541,9 @@ void GroupCall::requestUnknownParticipants() {
_unknownParticipantPeersRequestId = 0;
const auto now = crl::now();
for (const auto [ssrc, when] : ssrcs) {
applyLastSpoke(ssrc, when, now);
if (when.voice || when.anything) {
applyLastSpoke(ssrc, when, now);
}
_unknownSpokenSsrcs.remove(ssrc);
}
for (const auto [id, when] : participantPeerIds) {