2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Pass FullReplyTo everywhere.

This commit is contained in:
John Preston
2023-10-10 10:49:22 +04:00
parent a77131dfd6
commit 4240568ea5
53 changed files with 964 additions and 744 deletions

View File

@@ -1060,12 +1060,14 @@ void Manager::notificationActivated(
const auto replyToId = (id.msgId > 0
&& !history->peer->isUser()
&& id.msgId != topicRootId)
? id.msgId
: 0;
? FullMsgId(history->peer->id, id.msgId)
: FullMsgId();
auto draft = std::make_unique<Data::Draft>(
reply,
replyToId,
topicRootId,
FullReplyTo{
.messageId = replyToId,
.topicRootId = topicRootId,
},
MessageCursor{
int(reply.text.size()),
int(reply.text.size()),
@@ -1150,7 +1152,7 @@ void Manager::notificationReplied(
? topicRootId
: MsgId(0);
message.action.replyTo = {
.msgId = replyToId,
.messageId = { replyToId ? history->peer->id : 0, replyToId },
.topicRootId = topic ? topic->rootId() : 0,
};
message.action.clearDraft = false;