mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
parent
2afc171bec
commit
8d0fe601cf
1 changed files with 14 additions and 3 deletions
|
@ -2904,11 +2904,22 @@ FullStoryId HistoryItem::replyToStory() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
FullReplyTo HistoryItem::replyTo() const {
|
FullReplyTo HistoryItem::replyTo() const {
|
||||||
return {
|
auto result = FullReplyTo{
|
||||||
.messageId = replyToFullId(),
|
|
||||||
.storyId = replyToStory(),
|
|
||||||
.topicRootId = topicRootId(),
|
.topicRootId = topicRootId(),
|
||||||
};
|
};
|
||||||
|
if (const auto reply = Get<HistoryMessageReply>()) {
|
||||||
|
const auto &fields = reply->fields();
|
||||||
|
const auto peer = fields.externalPeerId;
|
||||||
|
const auto replyToPeer = peer ? peer : _history->peer->id;
|
||||||
|
if (const auto id = fields.messageId) {
|
||||||
|
result.messageId = { replyToPeer, id };
|
||||||
|
result.quote = fields.quote;
|
||||||
|
}
|
||||||
|
if (const auto id = fields.storyId) {
|
||||||
|
result.storyId = { replyToPeer, id };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HistoryItem::setText(const TextWithEntities &textWithEntities) {
|
void HistoryItem::setText(const TextWithEntities &textWithEntities) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue