From e07d53725c121ab55633aad54c580802d801eb92 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Mon, 1 Apr 2024 09:44:53 +0400 Subject: [PATCH] Strip notification service start error --- .../platform/linux/notifications_manager_linux.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp index 34e9a07eb..1242c751f 100644 --- a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp @@ -100,14 +100,15 @@ void StartServiceAsync(Gio::DBusConnection connection, Fn callback) { Core::Sandbox::Instance().customEnterFromEventLoop([&] { // get the error if any if (const auto ret = result(); !ret) { - const auto error = static_cast( + const auto &error = *static_cast( ret.error().get()); - if (error->gobj_()->domain != G_DBUS_ERROR - || error->code_() + if (error.gobj_()->domain != G_DBUS_ERROR + || error.code_() != G_DBUS_ERROR_SERVICE_UNKNOWN) { + Gio::DBusErrorNS_::strip_remote_error(error); LOG(("Native Notification Error: %1").arg( - error->what())); + error.message_().c_str())); } }