From 22315b810cb06c57cf20f510e097be1352d2bf23 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Sat, 24 Aug 2024 11:03:28 +0200 Subject: [PATCH] Adapt to libQuotient API change (cherry picked from commit d99f69cc24ba904cd06988396d5fe9891ae7d75a) --- src/controller.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/controller.cpp b/src/controller.cpp index 9dc71eb42..86c6028a3 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -64,7 +64,11 @@ Controller::Controller(QObject *parent) }); } else { auto c = new NeoChatConnection(this); +#if Quotient_VERSION_MINOR > 8 + c->assumeIdentity(QStringLiteral("@user:localhost:1234"), QStringLiteral("device_1234"), QStringLiteral("token_1234")); +#else c->assumeIdentity(QStringLiteral("@user:localhost:1234"), QStringLiteral("token_1234")); +#endif connect(c, &Connection::connected, this, [c, this]() { m_accountRegistry.add(c); c->syncLoop(); @@ -224,7 +228,11 @@ void Controller::invokeLogin() connect(connection, &NeoChatConnection::networkError, this, [this](const QString &error, const QString &, int, int) { Q_EMIT errorOccured(i18n("Network Error: %1", error), {}); }); +#if Quotient_VERSION_MINOR > 8 + connection->assumeIdentity(account.userId(), account.deviceId(), accessToken); +#else connection->assumeIdentity(account.userId(), accessToken); +#endif }); } }