mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Update API scheme to layer 124.
This commit is contained in:
@@ -92,19 +92,16 @@ void InviteLinks::performCreate(
|
||||
callbacks.push_back(std::move(done));
|
||||
}
|
||||
|
||||
// #TODO links
|
||||
//using Flag = MTPmessages_ExportChatInvite::Flag;
|
||||
//_api->request(MTPmessages_ExportChatInvite(
|
||||
// MTP_flags((revokeLegacyPermanent
|
||||
// ? Flag::f_legacy_revoke_permanent
|
||||
// : Flag(0))
|
||||
// | (expireDate ? Flag::f_expire_date : Flag(0))
|
||||
// | (usageLimit ? Flag::f_usage_limit : Flag(0))),
|
||||
// peer->input,
|
||||
// MTP_int(expireDate),
|
||||
// MTP_int(usageLimit)
|
||||
using Flag = MTPmessages_ExportChatInvite::Flag;
|
||||
_api->request(MTPmessages_ExportChatInvite(
|
||||
peer->input
|
||||
MTP_flags((revokeLegacyPermanent
|
||||
? Flag::f_legacy_revoke_permanent
|
||||
: Flag(0))
|
||||
| (expireDate ? Flag::f_expire_date : Flag(0))
|
||||
| (usageLimit ? Flag::f_usage_limit : Flag(0))),
|
||||
peer->input,
|
||||
MTP_int(expireDate),
|
||||
MTP_int(usageLimit)
|
||||
)).done([=](const MTPExportedChatInvite &result) {
|
||||
const auto callbacks = _createCallbacks.take(peer);
|
||||
const auto link = prepend(peer, result);
|
||||
|
@@ -304,7 +304,8 @@ bool SendDice(Api::MessageToSend &message) {
|
||||
MTP_string(messagePostAuthor),
|
||||
MTPlong(),
|
||||
//MTPMessageReactions(),
|
||||
MTPVector<MTPRestrictionReason>()),
|
||||
MTPVector<MTPRestrictionReason>(),
|
||||
MTPint()), // ttl_period
|
||||
clientFlags,
|
||||
NewMessageType::Unread);
|
||||
|
||||
@@ -453,7 +454,8 @@ void SendConfirmedFile(
|
||||
MTP_string(messagePostAuthor),
|
||||
MTP_long(groupId),
|
||||
//MTPMessageReactions(),
|
||||
MTPVector<MTPRestrictionReason>());
|
||||
MTPVector<MTPRestrictionReason>(),
|
||||
MTPint()); // ttl_period
|
||||
|
||||
if (itemToEdit) {
|
||||
itemToEdit->savePreviousMedia();
|
||||
@@ -491,7 +493,8 @@ void SendConfirmedFile(
|
||||
MTP_string(messagePostAuthor),
|
||||
MTP_long(groupId),
|
||||
//MTPMessageReactions(),
|
||||
MTPVector<MTPRestrictionReason>());
|
||||
MTPVector<MTPRestrictionReason>(),
|
||||
MTPint()); // ttl_period
|
||||
|
||||
if (itemToEdit) {
|
||||
itemToEdit->savePreviousMedia();
|
||||
@@ -533,7 +536,8 @@ void SendConfirmedFile(
|
||||
MTP_string(messagePostAuthor),
|
||||
MTP_long(groupId),
|
||||
//MTPMessageReactions(),
|
||||
MTPVector<MTPRestrictionReason>()),
|
||||
MTPVector<MTPRestrictionReason>(),
|
||||
MTPint()), // ttl_period
|
||||
clientFlags,
|
||||
NewMessageType::Unread);
|
||||
// Voices can't be edited.
|
||||
|
@@ -997,7 +997,8 @@ void Updates::applyUpdatesNoPtsCheck(const MTPUpdates &updates) {
|
||||
MTPstring(),
|
||||
MTPlong(),
|
||||
//MTPMessageReactions(),
|
||||
MTPVector<MTPRestrictionReason>()),
|
||||
MTPVector<MTPRestrictionReason>(),
|
||||
MTP_int(d.vttl_period().value_or_empty())),
|
||||
MTPDmessage_ClientFlags(),
|
||||
NewMessageType::Unread);
|
||||
} break;
|
||||
@@ -1027,7 +1028,8 @@ void Updates::applyUpdatesNoPtsCheck(const MTPUpdates &updates) {
|
||||
MTPstring(),
|
||||
MTPlong(),
|
||||
//MTPMessageReactions(),
|
||||
MTPVector<MTPRestrictionReason>()),
|
||||
MTPVector<MTPRestrictionReason>(),
|
||||
MTP_int(d.vttl_period().value_or_empty())),
|
||||
MTPDmessage_ClientFlags(),
|
||||
NewMessageType::Unread);
|
||||
} break;
|
||||
@@ -1825,6 +1827,11 @@ void Updates::feedUpdate(const MTPUpdate &update) {
|
||||
}
|
||||
} break;
|
||||
|
||||
case mtpc_updatePeerHistoryTTL: {
|
||||
const auto &d = update.c_updatePeerHistoryTTL();
|
||||
// #TODO ttl
|
||||
} break;
|
||||
|
||||
case mtpc_updateNewEncryptedMessage: {
|
||||
auto &d = update.c_updateNewEncryptedMessage();
|
||||
} break;
|
||||
|
Reference in New Issue
Block a user