Fix external replies to different topic groups.
This commit is contained in:
parent
46d3f232af
commit
bf20dbe3bc
|
@ -3579,14 +3579,8 @@ void ApiWrap::sendMessage(MessageToSend &&message) {
|
||||||
action.generateLocal = true;
|
action.generateLocal = true;
|
||||||
sendAction(action);
|
sendAction(action);
|
||||||
|
|
||||||
const auto replyTo = action.replyTo.messageId
|
const auto clearCloudDraft = action.clearDraft;
|
||||||
? peer->owner().message(action.replyTo.messageId)
|
const auto topicRootId = action.replyTo.topicRootId;
|
||||||
: nullptr;
|
|
||||||
const auto topicRootId = replyTo
|
|
||||||
? replyTo->topicRootId()
|
|
||||||
: action.replyTo.topicRootId
|
|
||||||
? action.replyTo.topicRootId
|
|
||||||
: Data::ForumTopic::kGeneralId;
|
|
||||||
const auto topic = peer->forumTopicFor(topicRootId);
|
const auto topic = peer->forumTopicFor(topicRootId);
|
||||||
if (!(topic ? Data::CanSendTexts(topic) : Data::CanSendTexts(peer))
|
if (!(topic ? Data::CanSendTexts(topic) : Data::CanSendTexts(peer))
|
||||||
|| Api::SendDice(message)) {
|
|| Api::SendDice(message)) {
|
||||||
|
@ -3682,8 +3676,6 @@ void ApiWrap::sendMessage(MessageToSend &&message) {
|
||||||
sendFlags |= MTPmessages_SendMessage::Flag::f_entities;
|
sendFlags |= MTPmessages_SendMessage::Flag::f_entities;
|
||||||
mediaFlags |= MTPmessages_SendMedia::Flag::f_entities;
|
mediaFlags |= MTPmessages_SendMedia::Flag::f_entities;
|
||||||
}
|
}
|
||||||
const auto clearCloudDraft = action.clearDraft;
|
|
||||||
const auto topicRootId = action.replyTo.topicRootId;
|
|
||||||
if (clearCloudDraft) {
|
if (clearCloudDraft) {
|
||||||
sendFlags |= MTPmessages_SendMessage::Flag::f_clear_draft;
|
sendFlags |= MTPmessages_SendMessage::Flag::f_clear_draft;
|
||||||
mediaFlags |= MTPmessages_SendMedia::Flag::f_clear_draft;
|
mediaFlags |= MTPmessages_SendMedia::Flag::f_clear_draft;
|
||||||
|
|
Loading…
Reference in New Issue