mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 23:53:58 +02:00
feat: allow to forward text messages
This commit is contained in:
parent
f94a7486e4
commit
6478208be5
1 changed files with 16 additions and 0 deletions
|
@ -3339,6 +3339,22 @@ void ApiWrap::forwardMessages(
|
||||||
}
|
}
|
||||||
|
|
||||||
auto forwardFrom = draft.items.front()->history()->peer;
|
auto forwardFrom = draft.items.front()->history()->peer;
|
||||||
|
if (!forwardFrom->allowsAyuForwarding()) {
|
||||||
|
history->setForwardDraft(topicRootId, {});
|
||||||
|
for (const auto item : draft.items) {
|
||||||
|
const auto messageText = item->originalText();
|
||||||
|
if (!messageText.text.isEmpty()) {
|
||||||
|
auto messageToSend = Api::MessageToSend(action);
|
||||||
|
messageToSend.textWithTags =
|
||||||
|
TextWithTags{messageText.text, TextUtilities::ConvertEntitiesToTextTags(messageText.entities)};
|
||||||
|
sendMessage(std::move(messageToSend));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (shared) {
|
||||||
|
shared->callback();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
auto ids = QVector<MTPint>();
|
auto ids = QVector<MTPint>();
|
||||||
auto randomIds = QVector<MTPlong>();
|
auto randomIds = QVector<MTPlong>();
|
||||||
auto localIds = std::shared_ptr<base::flat_map<uint64, FullMsgId>>();
|
auto localIds = std::shared_ptr<base::flat_map<uint64, FullMsgId>>();
|
||||||
|
|
Loading…
Add table
Reference in a new issue