From d9ff200ff62fb7f5b6b51082dc3979d5454a1bec Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sat, 25 Aug 2018 22:40:15 +0900 Subject: Update to the recent CS API (watch out for breakage) Breaking changes: * guest_can_join is no more a thing - neither in Connection::createRoom, nor even in CreateRoomJob (it turned out that Synapse didn't really process this flag); * LoginJob has changed its list of arguments. If you use Connection to do logins (and you really should), you shouldn't be affected. * GetPublicRoomsJob now returns PublicRoomsResponse instead of providing all the response parts within the job Watch other changes in the diff. --- lib/csapi/login.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/csapi/login.cpp') diff --git a/lib/csapi/login.cpp b/lib/csapi/login.cpp index 3956a1c4..363b6037 100644 --- a/lib/csapi/login.cpp +++ b/lib/csapi/login.cpp @@ -76,20 +76,21 @@ class LoginJob::Private static const auto LoginJobName = QStringLiteral("LoginJob"); -LoginJob::LoginJob(const QString& type, const QString& user, const QString& medium, const QString& address, const QString& password, const QString& token, const QString& deviceId, const QString& initialDeviceDisplayName) +LoginJob::LoginJob(const QString& type, const Omittable& identifier, const QString& password, const QString& token, const QString& deviceId, const QString& initialDeviceDisplayName, const QString& user, const QString& medium, const QString& address) : BaseJob(HttpVerb::Post, LoginJobName, basePath % "/login", false) , d(new Private) { QJsonObject _data; addParam<>(_data, QStringLiteral("type"), type); - addParam(_data, QStringLiteral("user"), user); - addParam(_data, QStringLiteral("medium"), medium); - addParam(_data, QStringLiteral("address"), address); + addParam(_data, QStringLiteral("identifier"), identifier); addParam(_data, QStringLiteral("password"), password); addParam(_data, QStringLiteral("token"), token); addParam(_data, QStringLiteral("device_id"), deviceId); addParam(_data, QStringLiteral("initial_device_display_name"), initialDeviceDisplayName); + addParam(_data, QStringLiteral("user"), user); + addParam(_data, QStringLiteral("medium"), medium); + addParam(_data, QStringLiteral("address"), address); setRequestData(_data); } -- cgit v1.2.3