2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Send and delete messages through Histories.

This commit is contained in:
John Preston
2020-02-21 14:29:48 +04:00
parent 147e8cc467
commit 818f5cd004
8 changed files with 363 additions and 258 deletions

View File

@@ -141,6 +141,9 @@ public:
void applyUpdates(
const MTPUpdates &updates,
uint64 sentMessageRandomId = 0);
int applyAffectedHistory(
not_null<PeerData*> peer,
const MTPmessages_AffectedHistory &result);
void registerModifyRequest(const QString &key, mtpRequestId requestId);
void clearModifyRequest(const QString &key);
@@ -298,10 +301,6 @@ public:
void clearHistory(not_null<PeerData*> peer, bool revoke);
void deleteConversation(not_null<PeerData*> peer, bool revoke);
void deleteMessages(
not_null<PeerData*> peer,
const QVector<MTPint> &ids,
bool revoke);
base::Observable<PeerData*> &fullPeerUpdated() {
return _fullPeerUpdated;
@@ -469,8 +468,8 @@ public:
void createPoll(
const PollData &data,
const SendAction &action,
FnMut<void()> done,
FnMut<void(const RPCError &error)> fail);
Fn<void()> done,
Fn<void(const RPCError &error)> fail);
void sendPollVotes(
FullMsgId itemId,
const std::vector<QByteArray> &options);
@@ -616,9 +615,6 @@ private:
not_null<PeerData*> peer,
bool justClear,
bool revoke);
int applyAffectedHistory(
not_null<PeerData*> peer,
const MTPmessages_AffectedHistory &result);
void applyAffectedMessages(const MTPmessages_AffectedMessages &result);
void deleteAllFromUserSend(