mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +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 {
|
||||
return {
|
||||
.messageId = replyToFullId(),
|
||||
.storyId = replyToStory(),
|
||||
auto result = FullReplyTo{
|
||||
.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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue