diff --git a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp index c399f97b28..f7fd5debc6 100644 --- a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp @@ -118,7 +118,7 @@ NotificationData::NotificationData( kInterface.utf16(), qsl("ActionInvoked"), this, - SLOT(notificationClicked(uint))); + SLOT(notificationClicked(uint,QString))); if (capabilities.contains(qsl("inline-reply"))) { _actions << qsl("inline-reply") @@ -261,13 +261,19 @@ void NotificationData::notificationClosed(uint id) { } } -void NotificationData::notificationClicked(uint id) { - if (id == _notificationId) { - const auto manager = _manager; - crl::on_main(manager, [=] { - manager->notificationActivated(_peerId, _msgId); - }); +void NotificationData::notificationClicked(uint id, const QString &actionId) { + if (id != _notificationId) { + return; } + + if (actionId != qsl("default") && actionId != qsl("mail-reply-sender")) { + return; + } + + const auto manager = _manager; + crl::on_main(manager, [=] { + manager->notificationActivated(_peerId, _msgId); + }); } void NotificationData::notificationReplied(uint id, const QString &text) { diff --git a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.h b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.h index 1addbb7012..4ac937216b 100644 --- a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.h +++ b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.h @@ -72,7 +72,7 @@ private: private slots: void notificationClosed(uint id); - void notificationClicked(uint id); + void notificationClicked(uint id, const QString &actionId); void notificationReplied(uint id, const QString &text); };