mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-05-03 00:30:37 +00:00
Fix sending messages from "View as Messages".
This commit is contained in:
parent
332ae22111
commit
20ba417ddd
@ -3580,7 +3580,14 @@ void ApiWrap::sendMessage(MessageToSend &&message) {
|
|||||||
sendAction(action);
|
sendAction(action);
|
||||||
|
|
||||||
const auto clearCloudDraft = action.clearDraft;
|
const auto clearCloudDraft = action.clearDraft;
|
||||||
const auto topicRootId = action.replyTo.topicRootId;
|
const auto replyTo = action.replyTo.messageId
|
||||||
|
? peer->owner().message(action.replyTo.messageId)
|
||||||
|
: nullptr;
|
||||||
|
const auto topicRootId = action.replyTo.topicRootId
|
||||||
|
? action.replyTo.topicRootId
|
||||||
|
: replyTo
|
||||||
|
? 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)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user