Update API scheme on layer 160: Replies.

This commit is contained in:
John Preston
2023-05-25 13:32:13 +04:00
parent 455cb0d21b
commit 04e7ce4408
50 changed files with 364 additions and 374 deletions
+4 -7
View File
@@ -43,13 +43,12 @@ void Polls::create(
const auto history = action.history;
const auto peer = history->peer;
const auto topicRootId = action.replyTo ? action.topicRootId : 0;
const auto topicRootId = action.replyTo.msgId
? action.replyTo.topicRootId
: 0;
auto sendFlags = MTPmessages_SendMedia::Flags(0);
if (action.replyTo) {
sendFlags |= MTPmessages_SendMedia::Flag::f_reply_to_msg_id;
if (topicRootId) {
sendFlags |= MTPmessages_SendMedia::Flag::f_top_msg_id;
}
sendFlags |= MTPmessages_SendMedia::Flag::f_reply_to;
}
const auto clearCloudDraft = action.clearDraft;
if (clearCloudDraft) {
@@ -74,13 +73,11 @@ void Polls::create(
histories.sendPreparedMessage(
history,
action.replyTo,
topicRootId,
randomId,
Data::Histories::PrepareMessage<MTPmessages_SendMedia>(
MTP_flags(sendFlags),
peer->input,
Data::Histories::ReplyToPlaceholder(),
Data::Histories::TopicRootPlaceholder(),
PollDataToInputMedia(&data),
MTP_string(),
MTP_long(randomId),