2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Implement factcheck edition.

This commit is contained in:
John Preston
2024-05-23 22:58:09 +04:00
parent 74861a334d
commit 493f0450b4
20 changed files with 264 additions and 29 deletions

View File

@@ -1065,6 +1065,12 @@ HistoryMessageLogEntryOriginal::~HistoryMessageLogEntryOriginal() = default;
MessageFactcheck FromMTP(
not_null<HistoryItem*> item,
const tl::conditional<MTPFactCheck> &factcheck) {
return FromMTP(&item->history()->session(), factcheck);
}
MessageFactcheck FromMTP(
not_null<Main::Session*> session,
const tl::conditional<MTPFactCheck> &factcheck) {
auto result = MessageFactcheck();
if (!factcheck) {
return result;
@@ -1074,9 +1080,7 @@ MessageFactcheck FromMTP(
const auto &data = text->data();
result.text = {
qs(data.vtext()),
Api::EntitiesFromMTP(
&item->history()->session(),
data.ventities().v),
Api::EntitiesFromMTP(session, data.ventities().v),
};
}
if (const auto country = data.vcountry()) {