mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-07-27 07:52:57 +02:00
Update API scheme to layer 206.
This commit is contained in:
parent
9290c90bdc
commit
b965aecc6c
20 changed files with 152 additions and 25 deletions
|
@ -14,6 +14,16 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
|
|
||||||
namespace Api {
|
namespace Api {
|
||||||
|
|
||||||
|
MTPSuggestedPost SuggestToMTP(const std::optional<SuggestOptions> &suggest) {
|
||||||
|
using Flag = MTPDsuggestedPost::Flag;
|
||||||
|
return suggest
|
||||||
|
? MTP_suggestedPost(
|
||||||
|
MTP_flags(suggest->date ? Flag::f_schedule_date : Flag()),
|
||||||
|
MTP_long(suggest->stars),
|
||||||
|
MTP_int(suggest->date))
|
||||||
|
: MTPSuggestedPost();
|
||||||
|
}
|
||||||
|
|
||||||
SendAction::SendAction(
|
SendAction::SendAction(
|
||||||
not_null<Data::Thread*> thread,
|
not_null<Data::Thread*> thread,
|
||||||
SendOptions options)
|
SendOptions options)
|
||||||
|
|
|
@ -19,6 +19,18 @@ namespace Api {
|
||||||
|
|
||||||
inline constexpr auto kScheduledUntilOnlineTimestamp = TimeId(0x7FFFFFFE);
|
inline constexpr auto kScheduledUntilOnlineTimestamp = TimeId(0x7FFFFFFE);
|
||||||
|
|
||||||
|
struct SuggestOptions {
|
||||||
|
int stars = 0;
|
||||||
|
TimeId date = 0;
|
||||||
|
|
||||||
|
friend inline bool operator==(
|
||||||
|
const SuggestOptions &,
|
||||||
|
const SuggestOptions &) = default;
|
||||||
|
};
|
||||||
|
|
||||||
|
[[nodiscard]] MTPSuggestedPost SuggestToMTP(
|
||||||
|
const std::optional<SuggestOptions> &suggest);
|
||||||
|
|
||||||
struct SendOptions {
|
struct SendOptions {
|
||||||
uint64 price = 0;
|
uint64 price = 0;
|
||||||
PeerData *sendAs = nullptr;
|
PeerData *sendAs = nullptr;
|
||||||
|
@ -31,6 +43,7 @@ struct SendOptions {
|
||||||
bool invertCaption = false;
|
bool invertCaption = false;
|
||||||
bool hideViaBot = false;
|
bool hideViaBot = false;
|
||||||
crl::time ttlSeconds = 0;
|
crl::time ttlSeconds = 0;
|
||||||
|
std::optional<SuggestOptions> suggest;
|
||||||
|
|
||||||
friend inline bool operator==(
|
friend inline bool operator==(
|
||||||
const SendOptions &,
|
const SendOptions &,
|
||||||
|
|
|
@ -75,6 +75,9 @@ void Polls::create(
|
||||||
if (action.options.effectId) {
|
if (action.options.effectId) {
|
||||||
sendFlags |= MTPmessages_SendMedia::Flag::f_effect;
|
sendFlags |= MTPmessages_SendMedia::Flag::f_effect;
|
||||||
}
|
}
|
||||||
|
if (action.options.suggest) {
|
||||||
|
sendFlags |= MTPmessages_SendMedia::Flag::f_suggested_post;
|
||||||
|
}
|
||||||
if (starsPaid) {
|
if (starsPaid) {
|
||||||
action.options.starsApproved -= starsPaid;
|
action.options.starsApproved -= starsPaid;
|
||||||
sendFlags |= MTPmessages_SendMedia::Flag::f_allow_paid_stars;
|
sendFlags |= MTPmessages_SendMedia::Flag::f_allow_paid_stars;
|
||||||
|
@ -102,7 +105,8 @@ void Polls::create(
|
||||||
(sendAs ? sendAs->input : MTP_inputPeerEmpty()),
|
(sendAs ? sendAs->input : MTP_inputPeerEmpty()),
|
||||||
Data::ShortcutIdToMTP(_session, action.options.shortcutId),
|
Data::ShortcutIdToMTP(_session, action.options.shortcutId),
|
||||||
MTP_long(action.options.effectId),
|
MTP_long(action.options.effectId),
|
||||||
MTP_long(starsPaid)
|
MTP_long(starsPaid),
|
||||||
|
SuggestToMTP(action.options.suggest)
|
||||||
), [=](const MTPUpdates &result, const MTP::Response &response) {
|
), [=](const MTPUpdates &result, const MTP::Response &response) {
|
||||||
if (clearCloudDraft) {
|
if (clearCloudDraft) {
|
||||||
history->finishSavingCloudDraft(
|
history->finishSavingCloudDraft(
|
||||||
|
|
|
@ -109,6 +109,9 @@ void SendSimpleMedia(SendAction action, MTPInputMedia inputMedia) {
|
||||||
if (action.options.effectId) {
|
if (action.options.effectId) {
|
||||||
sendFlags |= MTPmessages_SendMedia::Flag::f_effect;
|
sendFlags |= MTPmessages_SendMedia::Flag::f_effect;
|
||||||
}
|
}
|
||||||
|
if (action.options.suggest) {
|
||||||
|
sendFlags |= MTPmessages_SendMedia::Flag::f_suggested_post;
|
||||||
|
}
|
||||||
if (action.options.invertCaption) {
|
if (action.options.invertCaption) {
|
||||||
flags |= MessageFlag::InvertMedia;
|
flags |= MessageFlag::InvertMedia;
|
||||||
sendFlags |= MTPmessages_SendMedia::Flag::f_invert_media;
|
sendFlags |= MTPmessages_SendMedia::Flag::f_invert_media;
|
||||||
|
@ -136,7 +139,8 @@ void SendSimpleMedia(SendAction action, MTPInputMedia inputMedia) {
|
||||||
(sendAs ? sendAs->input : MTP_inputPeerEmpty()),
|
(sendAs ? sendAs->input : MTP_inputPeerEmpty()),
|
||||||
Data::ShortcutIdToMTP(session, action.options.shortcutId),
|
Data::ShortcutIdToMTP(session, action.options.shortcutId),
|
||||||
MTP_long(action.options.effectId),
|
MTP_long(action.options.effectId),
|
||||||
MTP_long(starsPaid)
|
MTP_long(starsPaid),
|
||||||
|
SuggestToMTP(action.options.suggest)
|
||||||
), [=](const MTPUpdates &result, const MTP::Response &response) {
|
), [=](const MTPUpdates &result, const MTP::Response &response) {
|
||||||
}, [=](const MTP::Error &error, const MTP::Response &response) {
|
}, [=](const MTP::Error &error, const MTP::Response &response) {
|
||||||
api->sendMessageFail(error, peer, randomId);
|
api->sendMessageFail(error, peer, randomId);
|
||||||
|
@ -211,6 +215,9 @@ void SendExistingMedia(
|
||||||
if (action.options.effectId) {
|
if (action.options.effectId) {
|
||||||
sendFlags |= MTPmessages_SendMedia::Flag::f_effect;
|
sendFlags |= MTPmessages_SendMedia::Flag::f_effect;
|
||||||
}
|
}
|
||||||
|
if (action.options.suggest) {
|
||||||
|
sendFlags |= MTPmessages_SendMedia::Flag::f_suggested_post;
|
||||||
|
}
|
||||||
if (action.options.invertCaption) {
|
if (action.options.invertCaption) {
|
||||||
flags |= MessageFlag::InvertMedia;
|
flags |= MessageFlag::InvertMedia;
|
||||||
sendFlags |= MTPmessages_SendMedia::Flag::f_invert_media;
|
sendFlags |= MTPmessages_SendMedia::Flag::f_invert_media;
|
||||||
|
@ -255,7 +262,8 @@ void SendExistingMedia(
|
||||||
(sendAs ? sendAs->input : MTP_inputPeerEmpty()),
|
(sendAs ? sendAs->input : MTP_inputPeerEmpty()),
|
||||||
Data::ShortcutIdToMTP(session, action.options.shortcutId),
|
Data::ShortcutIdToMTP(session, action.options.shortcutId),
|
||||||
MTP_long(action.options.effectId),
|
MTP_long(action.options.effectId),
|
||||||
MTP_long(starsPaid)
|
MTP_long(starsPaid),
|
||||||
|
SuggestToMTP(action.options.suggest)
|
||||||
), [=](const MTPUpdates &result, const MTP::Response &response) {
|
), [=](const MTPUpdates &result, const MTP::Response &response) {
|
||||||
}, [=](const MTP::Error &error, const MTP::Response &response) {
|
}, [=](const MTP::Error &error, const MTP::Response &response) {
|
||||||
if (error.code() == 400
|
if (error.code() == 400
|
||||||
|
@ -391,6 +399,9 @@ bool SendDice(MessageToSend &message) {
|
||||||
if (action.options.effectId) {
|
if (action.options.effectId) {
|
||||||
sendFlags |= MTPmessages_SendMedia::Flag::f_effect;
|
sendFlags |= MTPmessages_SendMedia::Flag::f_effect;
|
||||||
}
|
}
|
||||||
|
if (action.options.suggest) {
|
||||||
|
sendFlags |= MTPmessages_SendMedia::Flag::f_suggested_post;
|
||||||
|
}
|
||||||
if (action.options.invertCaption) {
|
if (action.options.invertCaption) {
|
||||||
flags |= MessageFlag::InvertMedia;
|
flags |= MessageFlag::InvertMedia;
|
||||||
sendFlags |= MTPmessages_SendMedia::Flag::f_invert_media;
|
sendFlags |= MTPmessages_SendMedia::Flag::f_invert_media;
|
||||||
|
@ -435,7 +446,8 @@ bool SendDice(MessageToSend &message) {
|
||||||
(sendAs ? sendAs->input : MTP_inputPeerEmpty()),
|
(sendAs ? sendAs->input : MTP_inputPeerEmpty()),
|
||||||
Data::ShortcutIdToMTP(session, action.options.shortcutId),
|
Data::ShortcutIdToMTP(session, action.options.shortcutId),
|
||||||
MTP_long(action.options.effectId),
|
MTP_long(action.options.effectId),
|
||||||
MTP_long(starsPaid)
|
MTP_long(starsPaid),
|
||||||
|
SuggestToMTP(action.options.suggest)
|
||||||
), [=](const MTPUpdates &result, const MTP::Response &response) {
|
), [=](const MTPUpdates &result, const MTP::Response &response) {
|
||||||
}, [=](const MTP::Error &error, const MTP::Response &response) {
|
}, [=](const MTP::Error &error, const MTP::Response &response) {
|
||||||
api->sendMessageFail(error, peer, randomId, newId);
|
api->sendMessageFail(error, peer, randomId, newId);
|
||||||
|
|
|
@ -77,6 +77,9 @@ void TodoLists::create(
|
||||||
if (action.options.effectId) {
|
if (action.options.effectId) {
|
||||||
sendFlags |= MTPmessages_SendMedia::Flag::f_effect;
|
sendFlags |= MTPmessages_SendMedia::Flag::f_effect;
|
||||||
}
|
}
|
||||||
|
if (action.options.suggest) {
|
||||||
|
sendFlags |= MTPmessages_SendMedia::Flag::f_suggested_post;
|
||||||
|
}
|
||||||
if (starsPaid) {
|
if (starsPaid) {
|
||||||
action.options.starsApproved -= starsPaid;
|
action.options.starsApproved -= starsPaid;
|
||||||
sendFlags |= MTPmessages_SendMedia::Flag::f_allow_paid_stars;
|
sendFlags |= MTPmessages_SendMedia::Flag::f_allow_paid_stars;
|
||||||
|
@ -104,7 +107,8 @@ void TodoLists::create(
|
||||||
(sendAs ? sendAs->input : MTP_inputPeerEmpty()),
|
(sendAs ? sendAs->input : MTP_inputPeerEmpty()),
|
||||||
Data::ShortcutIdToMTP(_session, action.options.shortcutId),
|
Data::ShortcutIdToMTP(_session, action.options.shortcutId),
|
||||||
MTP_long(action.options.effectId),
|
MTP_long(action.options.effectId),
|
||||||
MTP_long(starsPaid)
|
MTP_long(starsPaid),
|
||||||
|
SuggestToMTP(action.options.suggest)
|
||||||
), [=](const MTPUpdates &result, const MTP::Response &response) {
|
), [=](const MTPUpdates &result, const MTP::Response &response) {
|
||||||
if (clearCloudDraft) {
|
if (clearCloudDraft) {
|
||||||
history->finishSavingCloudDraft(
|
history->finishSavingCloudDraft(
|
||||||
|
|
|
@ -1228,7 +1228,8 @@ void Updates::applyUpdatesNoPtsCheck(const MTPUpdates &updates) {
|
||||||
MTPlong(), // effect
|
MTPlong(), // effect
|
||||||
MTPFactCheck(),
|
MTPFactCheck(),
|
||||||
MTPint(), // report_delivery_until_date
|
MTPint(), // report_delivery_until_date
|
||||||
MTPlong()), // paid_message_stars
|
MTPlong(), // paid_message_stars
|
||||||
|
MTPSuggestedPost()),
|
||||||
MessageFlags(),
|
MessageFlags(),
|
||||||
NewMessageType::Unread);
|
NewMessageType::Unread);
|
||||||
} break;
|
} break;
|
||||||
|
@ -1267,7 +1268,8 @@ void Updates::applyUpdatesNoPtsCheck(const MTPUpdates &updates) {
|
||||||
MTPlong(), // effect
|
MTPlong(), // effect
|
||||||
MTPFactCheck(),
|
MTPFactCheck(),
|
||||||
MTPint(), // report_delivery_until_date
|
MTPint(), // report_delivery_until_date
|
||||||
MTPlong()), // paid_message_stars
|
MTPlong(), // paid_message_stars
|
||||||
|
MTPSuggestedPost()),
|
||||||
MessageFlags(),
|
MessageFlags(),
|
||||||
NewMessageType::Unread);
|
NewMessageType::Unread);
|
||||||
} break;
|
} break;
|
||||||
|
|
|
@ -3963,6 +3963,10 @@ void ApiWrap::sendMessage(MessageToSend &&message) {
|
||||||
sendFlags |= MTPmessages_SendMessage::Flag::f_effect;
|
sendFlags |= MTPmessages_SendMessage::Flag::f_effect;
|
||||||
mediaFlags |= MTPmessages_SendMedia::Flag::f_effect;
|
mediaFlags |= MTPmessages_SendMedia::Flag::f_effect;
|
||||||
}
|
}
|
||||||
|
if (action.options.suggest) {
|
||||||
|
sendFlags |= MTPmessages_SendMessage::Flag::f_suggested_post;
|
||||||
|
mediaFlags |= MTPmessages_SendMedia::Flag::f_suggested_post;
|
||||||
|
}
|
||||||
const auto starsPaid = std::min(
|
const auto starsPaid = std::min(
|
||||||
peer->starsPerMessageChecked(),
|
peer->starsPerMessageChecked(),
|
||||||
action.options.starsApproved);
|
action.options.starsApproved);
|
||||||
|
@ -4030,7 +4034,8 @@ void ApiWrap::sendMessage(MessageToSend &&message) {
|
||||||
(sendAs ? sendAs->input : MTP_inputPeerEmpty()),
|
(sendAs ? sendAs->input : MTP_inputPeerEmpty()),
|
||||||
mtpShortcut,
|
mtpShortcut,
|
||||||
MTP_long(action.options.effectId),
|
MTP_long(action.options.effectId),
|
||||||
MTP_long(starsPaid)
|
MTP_long(starsPaid),
|
||||||
|
SuggestToMTP(action.options.suggest)
|
||||||
), done, fail);
|
), done, fail);
|
||||||
} else {
|
} else {
|
||||||
histories.sendPreparedMessage(
|
histories.sendPreparedMessage(
|
||||||
|
@ -4049,7 +4054,8 @@ void ApiWrap::sendMessage(MessageToSend &&message) {
|
||||||
(sendAs ? sendAs->input : MTP_inputPeerEmpty()),
|
(sendAs ? sendAs->input : MTP_inputPeerEmpty()),
|
||||||
mtpShortcut,
|
mtpShortcut,
|
||||||
MTP_long(action.options.effectId),
|
MTP_long(action.options.effectId),
|
||||||
MTP_long(starsPaid)
|
MTP_long(starsPaid),
|
||||||
|
SuggestToMTP(action.options.suggest)
|
||||||
), done, fail);
|
), done, fail);
|
||||||
}
|
}
|
||||||
isFirst = false;
|
isFirst = false;
|
||||||
|
@ -4355,6 +4361,7 @@ void ApiWrap::sendMediaWithRandomId(
|
||||||
| (options.sendAs ? Flag::f_send_as : Flag(0))
|
| (options.sendAs ? Flag::f_send_as : Flag(0))
|
||||||
| (options.shortcutId ? Flag::f_quick_reply_shortcut : Flag(0))
|
| (options.shortcutId ? Flag::f_quick_reply_shortcut : Flag(0))
|
||||||
| (options.effectId ? Flag::f_effect : Flag(0))
|
| (options.effectId ? Flag::f_effect : Flag(0))
|
||||||
|
| (options.suggest ? Flag::f_suggested_post : Flag(0))
|
||||||
| (options.invertCaption ? Flag::f_invert_media : Flag(0))
|
| (options.invertCaption ? Flag::f_invert_media : Flag(0))
|
||||||
| (starsPaid ? Flag::f_allow_paid_stars : Flag(0));
|
| (starsPaid ? Flag::f_allow_paid_stars : Flag(0));
|
||||||
|
|
||||||
|
@ -4383,7 +4390,8 @@ void ApiWrap::sendMediaWithRandomId(
|
||||||
(options.sendAs ? options.sendAs->input : MTP_inputPeerEmpty()),
|
(options.sendAs ? options.sendAs->input : MTP_inputPeerEmpty()),
|
||||||
Data::ShortcutIdToMTP(_session, options.shortcutId),
|
Data::ShortcutIdToMTP(_session, options.shortcutId),
|
||||||
MTP_long(options.effectId),
|
MTP_long(options.effectId),
|
||||||
MTP_long(starsPaid)
|
MTP_long(starsPaid),
|
||||||
|
SuggestToMTP(options.suggest)
|
||||||
), [=](const MTPUpdates &result, const MTP::Response &response) {
|
), [=](const MTPUpdates &result, const MTP::Response &response) {
|
||||||
if (done) done(true);
|
if (done) done(true);
|
||||||
if (updateRecentStickers) {
|
if (updateRecentStickers) {
|
||||||
|
@ -4438,6 +4446,7 @@ void ApiWrap::sendMultiPaidMedia(
|
||||||
| (options.sendAs ? Flag::f_send_as : Flag(0))
|
| (options.sendAs ? Flag::f_send_as : Flag(0))
|
||||||
| (options.shortcutId ? Flag::f_quick_reply_shortcut : Flag(0))
|
| (options.shortcutId ? Flag::f_quick_reply_shortcut : Flag(0))
|
||||||
| (options.effectId ? Flag::f_effect : Flag(0))
|
| (options.effectId ? Flag::f_effect : Flag(0))
|
||||||
|
| (options.suggest ? Flag::f_suggested_post : Flag(0))
|
||||||
| (options.invertCaption ? Flag::f_invert_media : Flag(0))
|
| (options.invertCaption ? Flag::f_invert_media : Flag(0))
|
||||||
| (starsPaid ? Flag::f_allow_paid_stars : Flag(0));
|
| (starsPaid ? Flag::f_allow_paid_stars : Flag(0));
|
||||||
|
|
||||||
|
@ -4465,7 +4474,8 @@ void ApiWrap::sendMultiPaidMedia(
|
||||||
(options.sendAs ? options.sendAs->input : MTP_inputPeerEmpty()),
|
(options.sendAs ? options.sendAs->input : MTP_inputPeerEmpty()),
|
||||||
Data::ShortcutIdToMTP(_session, options.shortcutId),
|
Data::ShortcutIdToMTP(_session, options.shortcutId),
|
||||||
MTP_long(options.effectId),
|
MTP_long(options.effectId),
|
||||||
MTP_long(starsPaid)
|
MTP_long(starsPaid),
|
||||||
|
SuggestToMTP(options.suggest)
|
||||||
), [=](const MTPUpdates &result, const MTP::Response &response) {
|
), [=](const MTPUpdates &result, const MTP::Response &response) {
|
||||||
if (const auto album = _sendingAlbums.take(groupId)) {
|
if (const auto album = _sendingAlbums.take(groupId)) {
|
||||||
const auto copy = (*album)->items;
|
const auto copy = (*album)->items;
|
||||||
|
|
|
@ -93,7 +93,10 @@ constexpr auto kRequestTimeLimit = 60 * crl::time(1000);
|
||||||
MTP_long(data.veffect().value_or_empty()),
|
MTP_long(data.veffect().value_or_empty()),
|
||||||
(data.vfactcheck() ? *data.vfactcheck() : MTPFactCheck()),
|
(data.vfactcheck() ? *data.vfactcheck() : MTPFactCheck()),
|
||||||
MTP_int(data.vreport_delivery_until_date().value_or_empty()),
|
MTP_int(data.vreport_delivery_until_date().value_or_empty()),
|
||||||
MTP_long(data.vpaid_message_stars().value_or_empty()));
|
MTP_long(data.vpaid_message_stars().value_or_empty()),
|
||||||
|
(data.vsuggested_post()
|
||||||
|
? *data.vsuggested_post()
|
||||||
|
: MTPSuggestedPost()));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,10 @@ constexpr auto kRequestTimeLimit = 60 * crl::time(1000);
|
||||||
MTP_long(data.veffect().value_or_empty()), // effect
|
MTP_long(data.veffect().value_or_empty()), // effect
|
||||||
data.vfactcheck() ? *data.vfactcheck() : MTPFactCheck(),
|
data.vfactcheck() ? *data.vfactcheck() : MTPFactCheck(),
|
||||||
MTP_int(data.vreport_delivery_until_date().value_or_empty()),
|
MTP_int(data.vreport_delivery_until_date().value_or_empty()),
|
||||||
MTP_long(data.vpaid_message_stars().value_or_empty()));
|
MTP_long(data.vpaid_message_stars().value_or_empty()),
|
||||||
|
(data.vsuggested_post()
|
||||||
|
? *data.vsuggested_post()
|
||||||
|
: MTPSuggestedPost()));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -272,7 +275,8 @@ void ScheduledMessages::sendNowSimpleMessage(
|
||||||
MTP_long(local->effectId()), // effect
|
MTP_long(local->effectId()), // effect
|
||||||
MTPFactCheck(),
|
MTPFactCheck(),
|
||||||
MTPint(), // report_delivery_until_date
|
MTPint(), // report_delivery_until_date
|
||||||
MTPlong()), // paid_message_stars
|
MTPlong(), // paid_message_stars
|
||||||
|
MTPSuggestedPost()),
|
||||||
localFlags,
|
localFlags,
|
||||||
NewMessageType::Unread);
|
NewMessageType::Unread);
|
||||||
|
|
||||||
|
|
|
@ -4950,7 +4950,8 @@ void Session::insertCheckedServiceNotification(
|
||||||
MTPlong(), // effect
|
MTPlong(), // effect
|
||||||
MTPFactCheck(),
|
MTPFactCheck(),
|
||||||
MTPint(), // report_delivery_until_date
|
MTPint(), // report_delivery_until_date
|
||||||
MTPlong()), // paid_message_stars
|
MTPlong(), // paid_message_stars
|
||||||
|
MTPSuggestedPost()),
|
||||||
localFlags,
|
localFlags,
|
||||||
NewMessageType::Unread);
|
NewMessageType::Unread);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1757,6 +1757,14 @@ ServiceAction ParseServiceAction(
|
||||||
| ranges::views::transform(ParseTodoListItem)
|
| ranges::views::transform(ParseTodoListItem)
|
||||||
| ranges::to_vector,
|
| ranges::to_vector,
|
||||||
};
|
};
|
||||||
|
}, [&](const MTPDmessageActionSuggestedPostApproval &data) {
|
||||||
|
result.content = ActionSuggestedPostApproval{
|
||||||
|
.rejectComment = data.vreject_comment().value_or_empty(),
|
||||||
|
.scheduleDate = data.vschedule_date().value_or_empty(),
|
||||||
|
.stars = int(data.vstars_amount().value_or_empty()),
|
||||||
|
.rejected = data.is_rejected(),
|
||||||
|
.balanceTooLow = data.is_balance_too_low(),
|
||||||
|
};
|
||||||
}, [&](const MTPDmessageActionConferenceCall &data) {
|
}, [&](const MTPDmessageActionConferenceCall &data) {
|
||||||
auto content = ActionPhoneCall();
|
auto content = ActionPhoneCall();
|
||||||
using State = ActionPhoneCall::State;
|
using State = ActionPhoneCall::State;
|
||||||
|
|
|
@ -698,6 +698,14 @@ struct ActionTodoAppendTasks {
|
||||||
std::vector<TodoListItem> items;
|
std::vector<TodoListItem> items;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct ActionSuggestedPostApproval {
|
||||||
|
Utf8String rejectComment;
|
||||||
|
TimeId scheduleDate = 0;
|
||||||
|
int stars = 0;
|
||||||
|
bool rejected = false;
|
||||||
|
bool balanceTooLow = false;
|
||||||
|
};
|
||||||
|
|
||||||
struct ServiceAction {
|
struct ServiceAction {
|
||||||
std::variant<
|
std::variant<
|
||||||
v::null_t,
|
v::null_t,
|
||||||
|
@ -747,7 +755,8 @@ struct ServiceAction {
|
||||||
ActionPaidMessagesRefunded,
|
ActionPaidMessagesRefunded,
|
||||||
ActionPaidMessagesPrice,
|
ActionPaidMessagesPrice,
|
||||||
ActionTodoCompletions,
|
ActionTodoCompletions,
|
||||||
ActionTodoAppendTasks> content;
|
ActionTodoAppendTasks,
|
||||||
|
ActionSuggestedPostApproval> content;
|
||||||
};
|
};
|
||||||
|
|
||||||
ServiceAction ParseServiceAction(
|
ServiceAction ParseServiceAction(
|
||||||
|
|
|
@ -1446,6 +1446,24 @@ auto HtmlWriter::Wrap::pushMessage(
|
||||||
+ """);
|
+ """);
|
||||||
}
|
}
|
||||||
return serviceFrom + " added tasks: " + tasks.join(", ");
|
return serviceFrom + " added tasks: " + tasks.join(", ");
|
||||||
|
}, [&](const ActionSuggestedPostApproval &data) {
|
||||||
|
return serviceFrom
|
||||||
|
+ (data.rejected ? " rejected " : " approved ")
|
||||||
|
+ "your suggested post"
|
||||||
|
+ (data.stars
|
||||||
|
? ", for " + QString::number(data.stars).toUtf8() + " stars"
|
||||||
|
: "")
|
||||||
|
+ (data.scheduleDate
|
||||||
|
? (", "
|
||||||
|
+ FormatDateText(data.scheduleDate)
|
||||||
|
+ " at "
|
||||||
|
+ FormatTimeText(data.scheduleDate))
|
||||||
|
: "")
|
||||||
|
+ (data.rejectComment.isEmpty()
|
||||||
|
? "."
|
||||||
|
: (", with comment: ""
|
||||||
|
+ SerializeString(data.rejectComment)
|
||||||
|
+ """));
|
||||||
}, [](v::null_t) { return QByteArray(); });
|
}, [](v::null_t) { return QByteArray(); });
|
||||||
|
|
||||||
if (!serviceText.isEmpty()) {
|
if (!serviceText.isEmpty()) {
|
||||||
|
|
|
@ -708,6 +708,18 @@ QByteArray SerializeMessage(
|
||||||
return result;
|
return result;
|
||||||
}) | ranges::to_vector;
|
}) | ranges::to_vector;
|
||||||
pushBare("items", SerializeArray(context, items));
|
pushBare("items", SerializeArray(context, items));
|
||||||
|
}, [&](const ActionSuggestedPostApproval &data) {
|
||||||
|
pushActor();
|
||||||
|
pushAction("process_suggested_post");
|
||||||
|
if (data.rejected) {
|
||||||
|
pushBare("rejected", "true");
|
||||||
|
if (!data.rejectComment.isEmpty()) {
|
||||||
|
push("comment", data.rejectComment);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
push("stars_amount", NumberToString(data.stars));
|
||||||
|
push("scheduled_date", data.scheduleDate);
|
||||||
|
}
|
||||||
}, [](v::null_t) {});
|
}, [](v::null_t) {});
|
||||||
|
|
||||||
if (v::is_null(message.action.content)) {
|
if (v::is_null(message.action.content)) {
|
||||||
|
|
|
@ -163,7 +163,8 @@ MTPMessage PrepareLogMessage(const MTPMessage &message, TimeId newDate) {
|
||||||
| Flag::f_restriction_reason
|
| Flag::f_restriction_reason
|
||||||
| Flag::f_ttl_period
|
| Flag::f_ttl_period
|
||||||
| Flag::f_factcheck
|
| Flag::f_factcheck
|
||||||
| Flag::f_report_delivery_until_date;
|
| Flag::f_report_delivery_until_date
|
||||||
|
| Flag::f_suggested_post;
|
||||||
return MTP_message(
|
return MTP_message(
|
||||||
MTP_flags(data.vflags().v & ~removeFlags),
|
MTP_flags(data.vflags().v & ~removeFlags),
|
||||||
data.vid(),
|
data.vid(),
|
||||||
|
@ -195,7 +196,8 @@ MTPMessage PrepareLogMessage(const MTPMessage &message, TimeId newDate) {
|
||||||
MTP_long(data.veffect().value_or_empty()),
|
MTP_long(data.veffect().value_or_empty()),
|
||||||
MTPFactCheck(),
|
MTPFactCheck(),
|
||||||
MTPint(), // report_delivery_until_date
|
MTPint(), // report_delivery_until_date
|
||||||
MTP_long(data.vpaid_message_stars().value_or_empty()));
|
MTP_long(data.vpaid_message_stars().value_or_empty()),
|
||||||
|
MTPSuggestedPost());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5913,6 +5913,10 @@ void HistoryItem::setServiceMessageByAction(const MTPmessageAction &action) {
|
||||||
return prepareTodoAppendTasksText();
|
return prepareTodoAppendTasksText();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
auto prepareSuggestedPostApproval = [&](const MTPDmessageActionSuggestedPostApproval &) {
|
||||||
|
return PreparedServiceText{ { "process_suggested" } }; AssertIsDebug();
|
||||||
|
};
|
||||||
|
|
||||||
auto prepareConferenceCall = [&](const MTPDmessageActionConferenceCall &) -> PreparedServiceText {
|
auto prepareConferenceCall = [&](const MTPDmessageActionConferenceCall &) -> PreparedServiceText {
|
||||||
Unexpected("PhoneCall type in setServiceMessageFromMtp.");
|
Unexpected("PhoneCall type in setServiceMessageFromMtp.");
|
||||||
};
|
};
|
||||||
|
@ -5969,6 +5973,7 @@ void HistoryItem::setServiceMessageByAction(const MTPmessageAction &action) {
|
||||||
prepareConferenceCall,
|
prepareConferenceCall,
|
||||||
prepareTodoCompletions,
|
prepareTodoCompletions,
|
||||||
prepareTodoAppendTasks,
|
prepareTodoAppendTasks,
|
||||||
|
prepareSuggestedPostApproval,
|
||||||
PrepareEmptyText<MTPDmessageActionRequestedPeerSentMe>,
|
PrepareEmptyText<MTPDmessageActionRequestedPeerSentMe>,
|
||||||
PrepareErrorText<MTPDmessageActionEmpty>));
|
PrepareErrorText<MTPDmessageActionEmpty>));
|
||||||
|
|
||||||
|
|
|
@ -135,6 +135,9 @@ namespace Media::Stories {
|
||||||
if (options.effectId) {
|
if (options.effectId) {
|
||||||
sendFlags |= SendFlag::f_effect;
|
sendFlags |= SendFlag::f_effect;
|
||||||
}
|
}
|
||||||
|
if (options.suggest) {
|
||||||
|
sendFlags |= SendFlag::f_suggested_post;
|
||||||
|
}
|
||||||
if (options.invertCaption) {
|
if (options.invertCaption) {
|
||||||
sendFlags |= SendFlag::f_invert_media;
|
sendFlags |= SendFlag::f_invert_media;
|
||||||
}
|
}
|
||||||
|
@ -170,7 +173,8 @@ namespace Media::Stories {
|
||||||
MTP_inputPeerEmpty(),
|
MTP_inputPeerEmpty(),
|
||||||
Data::ShortcutIdToMTP(session, options.shortcutId),
|
Data::ShortcutIdToMTP(session, options.shortcutId),
|
||||||
MTP_long(options.effectId),
|
MTP_long(options.effectId),
|
||||||
MTP_long(starsPaid)
|
MTP_long(starsPaid),
|
||||||
|
SuggestToMTP(options.suggest)
|
||||||
), [=](
|
), [=](
|
||||||
const MTPUpdates &result,
|
const MTPUpdates &result,
|
||||||
const MTP::Response &response) {
|
const MTP::Response &response) {
|
||||||
|
|
|
@ -117,7 +117,7 @@ chatPhotoEmpty#37c1011c = ChatPhoto;
|
||||||
chatPhoto#1c6e1c11 flags:# has_video:flags.0?true photo_id:long stripped_thumb:flags.1?bytes dc_id:int = ChatPhoto;
|
chatPhoto#1c6e1c11 flags:# has_video:flags.0?true photo_id:long stripped_thumb:flags.1?bytes dc_id:int = ChatPhoto;
|
||||||
|
|
||||||
messageEmpty#90a6ca84 flags:# id:int peer_id:flags.0?Peer = Message;
|
messageEmpty#90a6ca84 flags:# id:int peer_id:flags.0?Peer = Message;
|
||||||
message#eabcdd4d flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true from_scheduled:flags.18?true legacy:flags.19?true edit_hide:flags.21?true pinned:flags.24?true noforwards:flags.26?true invert_media:flags.27?true flags2:# offline:flags2.1?true video_processing_pending:flags2.4?true id:int from_id:flags.8?Peer from_boosts_applied:flags.29?int peer_id:Peer saved_peer_id:flags.28?Peer fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?long via_business_bot_id:flags2.0?long reply_to:flags.3?MessageReplyHeader date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector<MessageEntity> views:flags.10?int forwards:flags.10?int replies:flags.23?MessageReplies edit_date:flags.15?int post_author:flags.16?string grouped_id:flags.17?long reactions:flags.20?MessageReactions restriction_reason:flags.22?Vector<RestrictionReason> ttl_period:flags.25?int quick_reply_shortcut_id:flags.30?int effect:flags2.2?long factcheck:flags2.3?FactCheck report_delivery_until_date:flags2.5?int paid_message_stars:flags2.6?long = Message;
|
message#9815cec8 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true from_scheduled:flags.18?true legacy:flags.19?true edit_hide:flags.21?true pinned:flags.24?true noforwards:flags.26?true invert_media:flags.27?true flags2:# offline:flags2.1?true video_processing_pending:flags2.4?true id:int from_id:flags.8?Peer from_boosts_applied:flags.29?int peer_id:Peer saved_peer_id:flags.28?Peer fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?long via_business_bot_id:flags2.0?long reply_to:flags.3?MessageReplyHeader date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector<MessageEntity> views:flags.10?int forwards:flags.10?int replies:flags.23?MessageReplies edit_date:flags.15?int post_author:flags.16?string grouped_id:flags.17?long reactions:flags.20?MessageReactions restriction_reason:flags.22?Vector<RestrictionReason> ttl_period:flags.25?int quick_reply_shortcut_id:flags.30?int effect:flags2.2?long factcheck:flags2.3?FactCheck report_delivery_until_date:flags2.5?int paid_message_stars:flags2.6?long suggested_post:flags2.7?SuggestedPost = Message;
|
||||||
messageService#7a800e0a flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true reactions_are_possible:flags.9?true silent:flags.13?true post:flags.14?true legacy:flags.19?true id:int from_id:flags.8?Peer peer_id:Peer saved_peer_id:flags.28?Peer reply_to:flags.3?MessageReplyHeader date:int action:MessageAction reactions:flags.20?MessageReactions ttl_period:flags.25?int = Message;
|
messageService#7a800e0a flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true reactions_are_possible:flags.9?true silent:flags.13?true post:flags.14?true legacy:flags.19?true id:int from_id:flags.8?Peer peer_id:Peer saved_peer_id:flags.28?Peer reply_to:flags.3?MessageReplyHeader date:int action:MessageAction reactions:flags.20?MessageReactions ttl_period:flags.25?int = Message;
|
||||||
|
|
||||||
messageMediaEmpty#3ded6320 = MessageMedia;
|
messageMediaEmpty#3ded6320 = MessageMedia;
|
||||||
|
@ -192,6 +192,7 @@ messageActionPaidMessagesPrice#84b88578 flags:# broadcast_messages_allowed:flags
|
||||||
messageActionConferenceCall#2ffe2f7a flags:# missed:flags.0?true active:flags.1?true video:flags.4?true call_id:long duration:flags.2?int other_participants:flags.3?Vector<Peer> = MessageAction;
|
messageActionConferenceCall#2ffe2f7a flags:# missed:flags.0?true active:flags.1?true video:flags.4?true call_id:long duration:flags.2?int other_participants:flags.3?Vector<Peer> = MessageAction;
|
||||||
messageActionTodoCompletions#cc7c5c89 completed:Vector<int> incompleted:Vector<int> = MessageAction;
|
messageActionTodoCompletions#cc7c5c89 completed:Vector<int> incompleted:Vector<int> = MessageAction;
|
||||||
messageActionTodoAppendTasks#c7edbc83 list:Vector<TodoItem> = MessageAction;
|
messageActionTodoAppendTasks#c7edbc83 list:Vector<TodoItem> = MessageAction;
|
||||||
|
messageActionSuggestedPostApproval#af42ae29 flags:# rejected:flags.0?true balance_too_low:flags.1?true reject_comment:flags.2?string schedule_date:flags.3?int stars_amount:flags.4?long = MessageAction;
|
||||||
|
|
||||||
dialog#d58a08c6 flags:# pinned:flags.2?true unread_mark:flags.3?true view_forum_as_messages:flags.6?true peer:Peer top_message:int read_inbox_max_id:int read_outbox_max_id:int unread_count:int unread_mentions_count:int unread_reactions_count:int notify_settings:PeerNotifySettings pts:flags.0?int draft:flags.1?DraftMessage folder_id:flags.4?int ttl_period:flags.5?int = Dialog;
|
dialog#d58a08c6 flags:# pinned:flags.2?true unread_mark:flags.3?true view_forum_as_messages:flags.6?true peer:Peer top_message:int read_inbox_max_id:int read_outbox_max_id:int unread_count:int unread_mentions_count:int unread_reactions_count:int notify_settings:PeerNotifySettings pts:flags.0?int draft:flags.1?DraftMessage folder_id:flags.4?int ttl_period:flags.5?int = Dialog;
|
||||||
dialogFolder#71bd134c flags:# pinned:flags.2?true folder:Folder peer:Peer top_message:int unread_muted_peers_count:int unread_unmuted_peers_count:int unread_muted_messages_count:int unread_unmuted_messages_count:int = Dialog;
|
dialogFolder#71bd134c flags:# pinned:flags.2?true folder:Folder peer:Peer top_message:int unread_muted_peers_count:int unread_unmuted_peers_count:int unread_muted_messages_count:int unread_unmuted_messages_count:int = Dialog;
|
||||||
|
@ -1993,6 +1994,8 @@ todoList#49b92a26 flags:# others_can_append:flags.0?true others_can_complete:fla
|
||||||
|
|
||||||
todoCompletion#4cc120b7 id:int completed_by:long date:int = TodoCompletion;
|
todoCompletion#4cc120b7 id:int completed_by:long date:int = TodoCompletion;
|
||||||
|
|
||||||
|
suggestedPost#95ee6a6d flags:# accepted:flags.1?true rejected:flags.2?true stars_amount:long schedule_date:flags.0?int = SuggestedPost;
|
||||||
|
|
||||||
---functions---
|
---functions---
|
||||||
|
|
||||||
invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;
|
invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;
|
||||||
|
@ -2189,8 +2192,8 @@ messages.deleteHistory#b08f922a flags:# just_clear:flags.0?true revoke:flags.1?t
|
||||||
messages.deleteMessages#e58e95d2 flags:# revoke:flags.0?true id:Vector<int> = messages.AffectedMessages;
|
messages.deleteMessages#e58e95d2 flags:# revoke:flags.0?true id:Vector<int> = messages.AffectedMessages;
|
||||||
messages.receivedMessages#5a954c0 max_id:int = Vector<ReceivedNotifyMessage>;
|
messages.receivedMessages#5a954c0 max_id:int = Vector<ReceivedNotifyMessage>;
|
||||||
messages.setTyping#58943ee2 flags:# peer:InputPeer top_msg_id:flags.0?int action:SendMessageAction = Bool;
|
messages.setTyping#58943ee2 flags:# peer:InputPeer top_msg_id:flags.0?int action:SendMessageAction = Bool;
|
||||||
messages.sendMessage#fbf2340a flags:# no_webpage:flags.1?true silent:flags.5?true background:flags.6?true clear_draft:flags.7?true noforwards:flags.14?true update_stickersets_order:flags.15?true invert_media:flags.16?true allow_paid_floodskip:flags.19?true peer:InputPeer reply_to:flags.0?InputReplyTo message:string random_id:long reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector<MessageEntity> schedule_date:flags.10?int send_as:flags.13?InputPeer quick_reply_shortcut:flags.17?InputQuickReplyShortcut effect:flags.18?long allow_paid_stars:flags.21?long = Updates;
|
messages.sendMessage#fe05dc9a flags:# no_webpage:flags.1?true silent:flags.5?true background:flags.6?true clear_draft:flags.7?true noforwards:flags.14?true update_stickersets_order:flags.15?true invert_media:flags.16?true allow_paid_floodskip:flags.19?true peer:InputPeer reply_to:flags.0?InputReplyTo message:string random_id:long reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector<MessageEntity> schedule_date:flags.10?int send_as:flags.13?InputPeer quick_reply_shortcut:flags.17?InputQuickReplyShortcut effect:flags.18?long allow_paid_stars:flags.21?long suggested_post:flags.22?SuggestedPost = Updates;
|
||||||
messages.sendMedia#a550cd78 flags:# silent:flags.5?true background:flags.6?true clear_draft:flags.7?true noforwards:flags.14?true update_stickersets_order:flags.15?true invert_media:flags.16?true allow_paid_floodskip:flags.19?true peer:InputPeer reply_to:flags.0?InputReplyTo media:InputMedia message:string random_id:long reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector<MessageEntity> schedule_date:flags.10?int send_as:flags.13?InputPeer quick_reply_shortcut:flags.17?InputQuickReplyShortcut effect:flags.18?long allow_paid_stars:flags.21?long = Updates;
|
messages.sendMedia#ac55d9c1 flags:# silent:flags.5?true background:flags.6?true clear_draft:flags.7?true noforwards:flags.14?true update_stickersets_order:flags.15?true invert_media:flags.16?true allow_paid_floodskip:flags.19?true peer:InputPeer reply_to:flags.0?InputReplyTo media:InputMedia message:string random_id:long reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector<MessageEntity> schedule_date:flags.10?int send_as:flags.13?InputPeer quick_reply_shortcut:flags.17?InputQuickReplyShortcut effect:flags.18?long allow_paid_stars:flags.21?long suggested_post:flags.22?SuggestedPost = Updates;
|
||||||
messages.forwardMessages#38f0188c flags:# silent:flags.5?true background:flags.6?true with_my_score:flags.8?true drop_author:flags.11?true drop_media_captions:flags.12?true noforwards:flags.14?true allow_paid_floodskip:flags.19?true from_peer:InputPeer id:Vector<int> random_id:Vector<long> to_peer:InputPeer top_msg_id:flags.9?int reply_to:flags.22?InputReplyTo schedule_date:flags.10?int send_as:flags.13?InputPeer quick_reply_shortcut:flags.17?InputQuickReplyShortcut video_timestamp:flags.20?int allow_paid_stars:flags.21?long = Updates;
|
messages.forwardMessages#38f0188c flags:# silent:flags.5?true background:flags.6?true with_my_score:flags.8?true drop_author:flags.11?true drop_media_captions:flags.12?true noforwards:flags.14?true allow_paid_floodskip:flags.19?true from_peer:InputPeer id:Vector<int> random_id:Vector<long> to_peer:InputPeer top_msg_id:flags.9?int reply_to:flags.22?InputReplyTo schedule_date:flags.10?int send_as:flags.13?InputPeer quick_reply_shortcut:flags.17?InputQuickReplyShortcut video_timestamp:flags.20?int allow_paid_stars:flags.21?long = Updates;
|
||||||
messages.reportSpam#cf1592db peer:InputPeer = Bool;
|
messages.reportSpam#cf1592db peer:InputPeer = Bool;
|
||||||
messages.getPeerSettings#efd9a6a2 peer:InputPeer = messages.PeerSettings;
|
messages.getPeerSettings#efd9a6a2 peer:InputPeer = messages.PeerSettings;
|
||||||
|
@ -2409,6 +2412,7 @@ messages.getSavedDialogsByID#6f6f9c96 flags:# parent_peer:flags.1?InputPeer ids:
|
||||||
messages.readSavedHistory#ba4a3b5b parent_peer:InputPeer peer:InputPeer max_id:int = Bool;
|
messages.readSavedHistory#ba4a3b5b parent_peer:InputPeer peer:InputPeer max_id:int = Bool;
|
||||||
messages.toggleTodoCompleted#d3e03124 peer:InputPeer msg_id:int completed:Vector<int> incompleted:Vector<int> = Updates;
|
messages.toggleTodoCompleted#d3e03124 peer:InputPeer msg_id:int completed:Vector<int> incompleted:Vector<int> = Updates;
|
||||||
messages.appendTodoList#21a61057 peer:InputPeer msg_id:int list:Vector<TodoItem> = Updates;
|
messages.appendTodoList#21a61057 peer:InputPeer msg_id:int list:Vector<TodoItem> = Updates;
|
||||||
|
messages.toggleSuggestedPostApproval#8107455c flags:# reject:flags.1?true peer:InputPeer msg_id:int schedule_date:flags.0?int reject_comment:flags.2?string = Updates;
|
||||||
|
|
||||||
updates.getState#edd4882a = updates.State;
|
updates.getState#edd4882a = updates.State;
|
||||||
updates.getDifference#19c2f763 flags:# pts:int pts_limit:flags.1?int pts_total_limit:flags.0?int date:int qts:int qts_limit:flags.2?int = updates.Difference;
|
updates.getDifference#19c2f763 flags:# pts:int pts_limit:flags.1?int pts_total_limit:flags.0?int date:int qts:int qts_limit:flags.2?int = updates.Difference;
|
||||||
|
@ -2726,4 +2730,4 @@ smsjobs.finishJob#4f1ebf24 flags:# job_id:string error:flags.0?string = Bool;
|
||||||
|
|
||||||
fragment.getCollectibleInfo#be1e85ba collectible:InputCollectible = fragment.CollectibleInfo;
|
fragment.getCollectibleInfo#be1e85ba collectible:InputCollectible = fragment.CollectibleInfo;
|
||||||
|
|
||||||
// LAYER 205
|
// LAYER 206
|
||||||
|
|
|
@ -204,7 +204,8 @@ AdminLog::OwnedItem GenerateForwardedItem(
|
||||||
MTPlong(), // effect
|
MTPlong(), // effect
|
||||||
MTPFactCheck(),
|
MTPFactCheck(),
|
||||||
MTPint(), // report_delivery_until_date
|
MTPint(), // report_delivery_until_date
|
||||||
MTPlong() // paid_message_stars
|
MTPlong(), // paid_message_stars
|
||||||
|
MTPSuggestedPost()
|
||||||
).match([&](const MTPDmessage &data) {
|
).match([&](const MTPDmessage &data) {
|
||||||
return history->makeMessage(
|
return history->makeMessage(
|
||||||
history->nextNonHistoryEntryId(),
|
history->nextNonHistoryEntryId(),
|
||||||
|
|
|
@ -150,7 +150,8 @@ void ShareBotGame(
|
||||||
MTPInputPeer(), // send_as
|
MTPInputPeer(), // send_as
|
||||||
MTPInputQuickReplyShortcut(),
|
MTPInputQuickReplyShortcut(),
|
||||||
MTPlong(),
|
MTPlong(),
|
||||||
MTPlong()
|
MTPlong(),
|
||||||
|
MTPSuggestedPost()
|
||||||
), [=](const MTPUpdates &, const MTP::Response &) {
|
), [=](const MTPUpdates &, const MTP::Response &) {
|
||||||
}, [=](const MTP::Error &error, const MTP::Response &) {
|
}, [=](const MTP::Error &error, const MTP::Response &) {
|
||||||
history->session().api().sendMessageFail(error, history->peer);
|
history->session().api().sendMessageFail(error, history->peer);
|
||||||
|
|
Loading…
Add table
Reference in a new issue