From 6b331ca8b4efe9d3e73e2a1c4b6dd9f3c5edc291 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Mon, 4 Oct 2021 19:34:38 +0200 Subject: [PATCH] Adapt to libQuotient API changes --- src/controller.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/controller.cpp b/src/controller.cpp index a6b6a0057..2def31b7f 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -478,7 +478,11 @@ bool Controller::setAvatar(Connection *connection, const QUrl &avatarSource) } NeochatChangePasswordJob::NeochatChangePasswordJob(const QString &newPassword, bool logoutDevices, const Omittable &auth) - : BaseJob(HttpVerb::Post, QStringLiteral("ChangePasswordJob"), QStringLiteral("/_matrix/client/r0") % "/account/password") +#ifdef QUOTIENT_07 + : BaseJob(HttpVerb::Post, QStringLiteral("ChangePasswordJob"), "/_matrix/client/r0/account/password") +#else + : BaseJob(HttpVerb::Post, QStringLiteral("ChangePasswordJob"), QStringLiteral("/_matrix/client/r0/account/password")) +#endif { QJsonObject _data; addParam<>(_data, QStringLiteral("new_password"), newPassword); @@ -557,7 +561,11 @@ void Controller::saveWindowGeometry(QQuickWindow *window) } NeochatDeleteDeviceJob::NeochatDeleteDeviceJob(const QString &deviceId, const Omittable &auth) +#ifdef QUOTIENT_07 + : Quotient::BaseJob(HttpVerb::Delete, QStringLiteral("DeleteDeviceJob"), QStringLiteral("/_matrix/client/r0/devices/%1").arg(deviceId).toLatin1()) +#else : Quotient::BaseJob(HttpVerb::Delete, QStringLiteral("DeleteDeviceJob"), QStringLiteral("/_matrix/client/r0/devices/%1").arg(deviceId)) +#endif { QJsonObject _data; addParam(_data, QStringLiteral("auth"), auth);