Update API scheme to layer 206.

This commit is contained in:
John Preston
2025-06-13 13:40:46 +04:00
parent 9290c90bdc
commit b965aecc6c
20 changed files with 152 additions and 25 deletions
+15 -3
View File
@@ -109,6 +109,9 @@ void SendSimpleMedia(SendAction action, MTPInputMedia inputMedia) {
if (action.options.effectId) {
sendFlags |= MTPmessages_SendMedia::Flag::f_effect;
}
if (action.options.suggest) {
sendFlags |= MTPmessages_SendMedia::Flag::f_suggested_post;
}
if (action.options.invertCaption) {
flags |= MessageFlag::InvertMedia;
sendFlags |= MTPmessages_SendMedia::Flag::f_invert_media;
@@ -136,7 +139,8 @@ void SendSimpleMedia(SendAction action, MTPInputMedia inputMedia) {
(sendAs ? sendAs->input : MTP_inputPeerEmpty()),
Data::ShortcutIdToMTP(session, action.options.shortcutId),
MTP_long(action.options.effectId),
MTP_long(starsPaid)
MTP_long(starsPaid),
SuggestToMTP(action.options.suggest)
), [=](const MTPUpdates &result, const MTP::Response &response) {
}, [=](const MTP::Error &error, const MTP::Response &response) {
api->sendMessageFail(error, peer, randomId);
@@ -211,6 +215,9 @@ void SendExistingMedia(
if (action.options.effectId) {
sendFlags |= MTPmessages_SendMedia::Flag::f_effect;
}
if (action.options.suggest) {
sendFlags |= MTPmessages_SendMedia::Flag::f_suggested_post;
}
if (action.options.invertCaption) {
flags |= MessageFlag::InvertMedia;
sendFlags |= MTPmessages_SendMedia::Flag::f_invert_media;
@@ -255,7 +262,8 @@ void SendExistingMedia(
(sendAs ? sendAs->input : MTP_inputPeerEmpty()),
Data::ShortcutIdToMTP(session, action.options.shortcutId),
MTP_long(action.options.effectId),
MTP_long(starsPaid)
MTP_long(starsPaid),
SuggestToMTP(action.options.suggest)
), [=](const MTPUpdates &result, const MTP::Response &response) {
}, [=](const MTP::Error &error, const MTP::Response &response) {
if (error.code() == 400
@@ -391,6 +399,9 @@ bool SendDice(MessageToSend &message) {
if (action.options.effectId) {
sendFlags |= MTPmessages_SendMedia::Flag::f_effect;
}
if (action.options.suggest) {
sendFlags |= MTPmessages_SendMedia::Flag::f_suggested_post;
}
if (action.options.invertCaption) {
flags |= MessageFlag::InvertMedia;
sendFlags |= MTPmessages_SendMedia::Flag::f_invert_media;
@@ -435,7 +446,8 @@ bool SendDice(MessageToSend &message) {
(sendAs ? sendAs->input : MTP_inputPeerEmpty()),
Data::ShortcutIdToMTP(session, action.options.shortcutId),
MTP_long(action.options.effectId),
MTP_long(starsPaid)
MTP_long(starsPaid),
SuggestToMTP(action.options.suggest)
), [=](const MTPUpdates &result, const MTP::Response &response) {
}, [=](const MTP::Error &error, const MTP::Response &response) {
api->sendMessageFail(error, peer, randomId, newId);