mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Fix forwarding to General topic.
This commit is contained in:
@@ -1403,11 +1403,16 @@ ShareBox::SubmitCallback ShareBox::DefaultForwardCallback(
|
||||
api.sendMessage(std::move(message));
|
||||
}
|
||||
const auto topicRootId = thread->topicRootId();
|
||||
const auto kGeneralId = Data::ForumTopic::kGeneralId;
|
||||
const auto topMsgId = (topicRootId == kGeneralId)
|
||||
? MsgId(0)
|
||||
: topicRootId;
|
||||
const auto peer = thread->peer();
|
||||
histories.sendRequest(history, requestType, [=](Fn<void()> finish) {
|
||||
histories.sendRequest(history, requestType, [=](
|
||||
Fn<void()> finish) {
|
||||
auto &api = history->session().api();
|
||||
const auto sendFlags = commonSendFlags
|
||||
| (topicRootId ? Flag::f_top_msg_id : Flag(0))
|
||||
| (topMsgId ? Flag::f_top_msg_id : Flag(0))
|
||||
| (ShouldSendSilent(peer, options)
|
||||
? Flag::f_silent
|
||||
: Flag(0));
|
||||
@@ -1418,7 +1423,7 @@ ShareBox::SubmitCallback ShareBox::DefaultForwardCallback(
|
||||
MTP_vector<MTPint>(mtpMsgIds),
|
||||
MTP_vector<MTPlong>(generateRandom()),
|
||||
peer->input,
|
||||
MTP_int(topicRootId),
|
||||
MTP_int(topMsgId),
|
||||
MTP_int(options.scheduled),
|
||||
MTP_inputPeerEmpty() // send_as
|
||||
)).done([=](const MTPUpdates &updates, mtpRequestId reqId) {
|
||||
|
Reference in New Issue
Block a user