mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-01 07:05:13 +00:00
Fix sending messages from "View as Messages".
This commit is contained in:
@@ -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)) {
|
||||||
|
Reference in New Issue
Block a user