diff --git a/Telegram/SourceFiles/data/data_media_types.cpp b/Telegram/SourceFiles/data/data_media_types.cpp index 0c8120498..96204825e 100644 --- a/Telegram/SourceFiles/data/data_media_types.cpp +++ b/Telegram/SourceFiles/data/data_media_types.cpp @@ -534,7 +534,7 @@ bool MediaPhoto::replyPreviewLoaded() const { QString MediaPhoto::notificationText() const { return WithCaptionNotificationText( tr::lng_in_dlg_photo(tr::now), - parent()->originalText().text); + TextUtilities::TextWithSpoilerCommands(parent()->originalText())); } ItemPreview MediaPhoto::toPreview(ToPreviewOptions options) const { @@ -814,7 +814,9 @@ QString MediaFile::notificationText() const { } return tr::lng_in_dlg_file(tr::now); }(); - return WithCaptionNotificationText(type, parent()->originalText().text); + return WithCaptionNotificationText( + type, + TextUtilities::TextWithSpoilerCommands(parent()->originalText())); } QString MediaFile::pinnedTextSubstring() const { @@ -1307,7 +1309,7 @@ ItemPreview MediaWebPage::toPreview(ToPreviewOptions options) const { } QString MediaWebPage::notificationText() const { - return parent()->originalText().text; + return TextUtilities::TextWithSpoilerCommands(parent()->originalText()); } QString MediaWebPage::pinnedTextSubstring() const { diff --git a/Telegram/SourceFiles/history/history_item.cpp b/Telegram/SourceFiles/history/history_item.cpp index a3675ec9b..eb36caf03 100644 --- a/Telegram/SourceFiles/history/history_item.cpp +++ b/Telegram/SourceFiles/history/history_item.cpp @@ -1022,7 +1022,8 @@ QString HistoryItem::notificationText() const { if (_media && !isService()) { return _media->notificationText(); } else if (!emptyText()) { - return _text.toString(); + return TextUtilities::TextWithSpoilerCommands( + _text.toTextWithEntities()); } return QString(); }();