From 606db144b9ef6f1b2958ff49c4a6860bff48090c Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Wed, 11 Jul 2018 18:34:41 +0900 Subject: csapi: Update to the latest API definitions Presence requires authentication; GetConfigJob; GetLoginFlowsJob; serverName parameter in JoinRoomJob. --- lib/csapi/joining.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'lib/csapi/joining.cpp') diff --git a/lib/csapi/joining.cpp b/lib/csapi/joining.cpp index 0a4618af..1a29ac62 100644 --- a/lib/csapi/joining.cpp +++ b/lib/csapi/joining.cpp @@ -90,11 +90,19 @@ class JoinRoomJob::Private QString roomId; }; +BaseJob::Query queryToJoinRoom(const QStringList& serverName) +{ + BaseJob::Query _q; + addParam(_q, QStringLiteral("server_name"), serverName); + return _q; +} + static const auto JoinRoomJobName = QStringLiteral("JoinRoomJob"); -JoinRoomJob::JoinRoomJob(const QString& roomIdOrAlias, const Omittable& thirdPartySigned) +JoinRoomJob::JoinRoomJob(const QString& roomIdOrAlias, const QStringList& serverName, const Omittable& thirdPartySigned) : BaseJob(HttpVerb::Post, JoinRoomJobName, - basePath % "/join/" % roomIdOrAlias) + basePath % "/join/" % roomIdOrAlias, + queryToJoinRoom(serverName)) , d(new Private) { QJsonObject _data; -- cgit v1.2.3