diff --git a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp index 31e3775dc..a13918362 100644 --- a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp @@ -149,10 +149,16 @@ void GetInhibitionSupported(Fn callback) { const auto async = QDBusConnection::sessionBus().asyncCall(message); auto watcher = new QDBusPendingCallWatcher(async); + static const auto DontLogErrors = { + QDBusError::NoError, + QDBusError::InvalidArgs, + QDBusError::UnknownProperty, + }; + const auto finished = [=](QDBusPendingCallWatcher *call) { const auto error = QDBusPendingReply(*call).error(); - if (error.isValid() && error.type() != QDBusError::InvalidArgs) { + if (!ranges::contains(DontLogErrors, error.type())) { LOG(("Native Notification Error: %1: %2") .arg(error.name()) .arg(error.message()));