From dbb7568b928eb6b9fa924f2d17ca9daf71191ae0 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 11 Feb 2019 15:50:35 +0300 Subject: [PATCH] Fix changelogs blog link previews. --- Telegram/SourceFiles/core/changelogs.cpp | 6 ++---- Telegram/SourceFiles/data/data_session.cpp | 3 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Telegram/SourceFiles/core/changelogs.cpp b/Telegram/SourceFiles/core/changelogs.cpp index 95190cff3..7fa155ed4 100644 --- a/Telegram/SourceFiles/core/changelogs.cpp +++ b/Telegram/SourceFiles/core/changelogs.cpp @@ -87,7 +87,7 @@ Changelogs::Changelogs(not_null session, int oldVersion) , _oldVersion(oldVersion) { _chatsSubscription = subscribe( _session->data().moreChatsLoaded(), - [this] { requestCloudLogs(); }); + [=] { requestCloudLogs(); }); } std::unique_ptr Changelogs::Create( @@ -150,9 +150,7 @@ void Changelogs::addLocalLogs() { void Changelogs::addLocalLog(const QString &text) { auto textWithEntities = TextWithEntities{ text }; TextUtilities::ParseEntities(textWithEntities, TextParseLinks); - _session->data().serviceNotification( - textWithEntities, - MTP_messageMediaEmpty()); + _session->data().serviceNotification(textWithEntities); _addedSomeLocal = true; }; diff --git a/Telegram/SourceFiles/data/data_session.cpp b/Telegram/SourceFiles/data/data_session.cpp index 16357d25f..414aeef2d 100644 --- a/Telegram/SourceFiles/data/data_session.cpp +++ b/Telegram/SourceFiles/data/data_session.cpp @@ -2992,7 +2992,8 @@ void Session::insertCheckedServiceNotification( } const auto flags = MTPDmessage::Flag::f_entities | MTPDmessage::Flag::f_from_id - | MTPDmessage_ClientFlag::f_clientside_unread; + | MTPDmessage_ClientFlag::f_clientside_unread + | MTPDmessage::Flag::f_media; auto sending = TextWithEntities(), left = message; while (TextUtilities::CutPart(sending, left, MaxMessageSize)) { addNewMessage(