diff --git a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp index 46ad6f85b..c399f97b2 100644 --- a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp @@ -47,7 +47,7 @@ std::vector GetServerInformation( } } else if (serverInformationReply.type() == QDBusMessage::ErrorMessage) { LOG(("Native notification error: %1") - .arg(QDBusError(serverInformationReply).message())); + .arg(serverInformationReply.errorMessage())); } else { LOG(("Native notification error: " "error while getting information about notification daemon")); diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp index 741d69274..51fc1e902 100644 --- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp @@ -55,11 +55,18 @@ void SandboxAutostart(bool autostart) { }); options["dbus-activatable"] = false; - QDBusInterface( + const auto requestBackgroundReply = QDBusInterface( qsl("org.freedesktop.portal.Desktop"), qsl("/org/freedesktop/portal/desktop"), - qsl("/org/freedesktop/portal/desktop") + qsl("org.freedesktop.portal.Background") ).call(qsl("RequestBackground"), QString(), options); + + if (requestBackgroundReply.type() == QDBusMessage::ErrorMessage) { + LOG(("Flatpak autostart error: %1") + .arg(requestBackgroundReply.errorMessage())); + } else if (requestBackgroundReply.type() != QDBusMessage::ReplyMessage) { + LOG(("Flatpak autostart error: invalid reply")); + } } #endif