mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Add revoking of full history.
This commit is contained in:
@@ -899,26 +899,6 @@ void MainWidget::dialogsActivate() {
|
||||
_dialogs->activate();
|
||||
}
|
||||
|
||||
void MainWidget::deleteMessages(
|
||||
not_null<PeerData*> peer,
|
||||
const QVector<MTPint> &ids,
|
||||
bool revoke) {
|
||||
if (const auto channel = peer->asChannel()) {
|
||||
MTP::send(
|
||||
MTPchannels_DeleteMessages(
|
||||
channel->inputChannel,
|
||||
MTP_vector<MTPint>(ids)),
|
||||
rpcDone(&MainWidget::messagesAffected, peer));
|
||||
} else {
|
||||
using Flag = MTPmessages_DeleteMessages::Flag;
|
||||
MTP::send(
|
||||
MTPmessages_DeleteMessages(
|
||||
MTP_flags(revoke ? Flag::f_revoke : Flag(0)),
|
||||
MTP_vector<MTPint>(ids)),
|
||||
rpcDone(&MainWidget::messagesAffected, peer));
|
||||
}
|
||||
}
|
||||
|
||||
void MainWidget::removeDialog(Dialogs::Key key) {
|
||||
_dialogs->removeDialog(key);
|
||||
}
|
||||
@@ -1055,21 +1035,6 @@ void MainWidget::checkLastUpdate(bool afterSleep) {
|
||||
}
|
||||
}
|
||||
|
||||
void MainWidget::messagesAffected(
|
||||
not_null<PeerData*> peer,
|
||||
const MTPmessages_AffectedMessages &result) {
|
||||
const auto &data = result.c_messages_affectedMessages();
|
||||
if (const auto channel = peer->asChannel()) {
|
||||
channel->ptsUpdateAndApply(data.vpts.v, data.vpts_count.v);
|
||||
} else {
|
||||
ptsUpdateAndApply(data.vpts.v, data.vpts_count.v);
|
||||
}
|
||||
|
||||
if (const auto history = session().data().historyLoaded(peer)) {
|
||||
history->requestChatListMessage();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWidget::handleAudioUpdate(const Media::Player::TrackState &state) {
|
||||
using State = Media::Player::State;
|
||||
const auto document = state.id.audio();
|
||||
|
Reference in New Issue
Block a user