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

Moved code for api participants to separated file.

This commit is contained in:
23rd
2021-11-24 07:25:05 +03:00
committed by John Preston
parent 3271cdf251
commit b9c64499bd
24 changed files with 840 additions and 730 deletions

View File

@@ -49,7 +49,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "base/unixtime.h"
#include "base/qt_signal_producer.h"
#include "base/timer_rpl.h"
#include "apiwrap.h" // api().kickParticipant.
#include "apiwrap.h" // api().kick.
#include "api/api_chat_participants.h" // api().kick.
#include "webrtc/webrtc_video_track.h"
#include "webrtc/webrtc_media_devices.h" // UniqueDesktopCaptureSource.
#include "webrtc/webrtc_audio_input_tester.h"
@@ -1344,7 +1345,7 @@ void Panel::showBox(
void Panel::kickParticipantSure(not_null<PeerData*> participantPeer) {
if (const auto chat = _peer->asChat()) {
chat->session().api().kickParticipant(chat, participantPeer);
chat->session().api().chatParticipants().kick(chat, participantPeer);
} else if (const auto channel = _peer->asChannel()) {
const auto currentRestrictedRights = [&] {
const auto user = participantPeer->asUser();
@@ -1356,7 +1357,7 @@ void Panel::kickParticipantSure(not_null<PeerData*> participantPeer) {
? i->second.rights
: ChatRestrictionsInfo();
}();
channel->session().api().kickParticipant(
channel->session().api().chatParticipants().kick(
channel,
participantPeer,
currentRestrictedRights);