Fix compatibility with newer quotient job api

This commit is contained in:
Tobias Fella
2024-05-14 16:50:38 +02:00
parent 0ecdf354c6
commit 9da7462f3e
4 changed files with 26 additions and 2 deletions

View File

@@ -128,8 +128,12 @@ void DevicesModel::logout(const QString &deviceId, const QString &password)
authData["type"_ls] = "m.login.password"_ls;
QJsonObject identifier = {{"type"_ls, "m.id.user"_ls}, {"user"_ls, m_connection->user()->id()}};
authData["identifier"_ls] = identifier;
auto *innerJob = m_connection->callApi<NeochatDeleteDeviceJob>(m_devices[index].deviceId, authData);
auto innerJob = m_connection->callApi<NeochatDeleteDeviceJob>(m_devices[index].deviceId, authData);
#if Quotient_VERSION_MINOR > 8
connect(innerJob.get(), &BaseJob::success, this, onSuccess);
#else
connect(innerJob, &BaseJob::success, this, onSuccess);
#endif
} else {
onSuccess();
}