Fix translation of replies to web-page previews.

This commit is contained in:
John Preston 2023-01-30 19:33:52 +04:00
parent f4455663fc
commit 5ba7b3906c
1 changed files with 5 additions and 2 deletions

View File

@ -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 {