From 56d75e7c531748d2aafed5f934cd4b51b6f02703 Mon Sep 17 00:00:00 2001 From: levlam Date: Wed, 24 Jan 2024 20:01:29 +0300 Subject: [PATCH] Don't keep full message source for initially forwarded messages. --- td/telegram/MessagesManager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 8dc8ead56..700ef910b 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -26708,6 +26708,10 @@ unique_ptr MessagesManager::create_message_forward_info(Dial if (from_dialog_id != my_dialog_id || content_type == MessageContentType::Dice) { auto origin = get_forwarded_message_origin(from_dialog_id, m); if (!origin.is_empty()) { + if (!last_message_info.is_empty()) { + last_message_info = + LastForwardedMessageInfo(from_dialog_id, m->message_id, DialogId(), string(), 0, m->is_outgoing); + } return td::make_unique(std::move(origin), m->date, std::move(last_message_info), "", false); } }