From 5ba7b3906c6e0e4d1abf59467a395125101cb817 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 30 Jan 2023 19:33:52 +0400 Subject: [PATCH] Fix translation of replies to web-page previews. --- Telegram/SourceFiles/data/data_media_types.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/data/data_media_types.cpp b/Telegram/SourceFiles/data/data_media_types.cpp index 831f7b06ce..151bb3f89b 100644 --- a/Telegram/SourceFiles/data/data_media_types.cpp +++ b/Telegram/SourceFiles/data/data_media_types.cpp @@ -1254,7 +1254,7 @@ ItemPreview MediaLocation::toPreview(ToPreviewOptions options) const { TextWithEntities MediaLocation::notificationText() const { return WithCaptionNotificationText( tr::lng_maps_point(tr::now), - { .text = _title}); + { .text = _title }); } QString MediaLocation::pinnedTextSubstring() const { @@ -1442,7 +1442,10 @@ bool MediaWebPage::replyPreviewLoaded() const { } ItemPreview MediaWebPage::toPreview(ToPreviewOptions options) const { - return { .text = notificationText() }; + return { .text = options.translated + ? parent()->translatedText() + : parent()->originalText() + }; } TextWithEntities MediaWebPage::notificationText() const {