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

Improve group call service messages.

This commit is contained in:
John Preston
2020-12-01 17:17:05 +03:00
parent 5a324756fd
commit c82bc691e0
6 changed files with 104 additions and 13 deletions

View File

@@ -800,6 +800,14 @@ void Session::unregisterGroupCall(not_null<GroupCall*> call) {
_groupCalls.remove(call->id());
}
rpl::producer<Session::GroupCallDiscard> Session::groupCallDiscards() const {
return _groupCallDiscarded.events();
}
void Session::groupCallDiscarded(uint64 id, int duration) {
_groupCallDiscarded.fire({ id, duration });
}
GroupCall *Session::groupCall(uint64 callId) const {
const auto i = _groupCalls.find(callId);
return (i != end(_groupCalls)) ? i->second.get() : nullptr;