mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-14 07:23:46 +00:00
Update API scheme on layer 160: Replies.
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user