mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-01 07:05:13 +00:00
@@ -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) {
|
||||||
|
Reference in New Issue
Block a user