diff --git a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp index 93c6aaf1de..2184fcecdd 100644 --- a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp @@ -385,12 +385,12 @@ bool NotificationData::init( const QString &msg, Window::Notifications::Manager::DisplayOptions options) { if (_application) { - _notification = Gio::Notification::create(title.toStdString()); - - _notification->set_body( + _notification = Gio::Notification::create( subtitle.isEmpty() - ? msg.toStdString() - : u"%1\n%2"_q.arg(subtitle, msg).toStdString()); + ? title.toStdString() + : subtitle.toStdString() + " (" + title.toStdString() + ')'); + + _notification->set_body(msg.toStdString()); _notification->set_icon( Gio::ThemedIcon::create(base::IconName().toStdString())); @@ -500,19 +500,22 @@ bool NotificationData::init( }); }; - _title = title.toStdString(); _imageKey = GetImageKey(CurrentServerInformationValue().specVersion); if (capabilities.contains(u"body-markup"_q)) { + _title = title.toStdString(); + _body = subtitle.isEmpty() ? msg.toHtmlEscaped().toStdString() : u"%1\n%2"_q.arg( subtitle.toHtmlEscaped(), msg.toHtmlEscaped()).toStdString(); } else { - _body = subtitle.isEmpty() - ? msg.toStdString() - : u"%1\n%2"_q.arg(subtitle, msg).toStdString(); + _title = subtitle.isEmpty() + ? title.toStdString() + : subtitle.toStdString() + " (" + title.toStdString() + ')'; + + _body = msg.toStdString(); } if (capabilities.contains("actions")) { @@ -820,8 +823,6 @@ bool ByDefault() { static const auto NeededCapabilities = { // To show message content u"body"_q, - // To make the sender name bold - u"body-markup"_q, // To have buttons on notifications u"actions"_q, // To have quick reply