diff options
Diffstat (limited to 'lib/csapi/joining.cpp')
-rw-r--r-- | lib/csapi/joining.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/csapi/joining.cpp b/lib/csapi/joining.cpp index 373c1c6a..cdba95e9 100644 --- a/lib/csapi/joining.cpp +++ b/lib/csapi/joining.cpp @@ -10,13 +10,13 @@ JoinRoomByIdJob::JoinRoomByIdJob( const QString& roomId, const Omittable<ThirdPartySigned>& thirdPartySigned, const QString& reason) : BaseJob(HttpVerb::Post, QStringLiteral("JoinRoomByIdJob"), - makePath("/_matrix/client/r0", "/rooms/", roomId, "/join")) + makePath("/_matrix/client/v3", "/rooms/", roomId, "/join")) { - QJsonObject _data; - addParam<IfNotEmpty>(_data, QStringLiteral("third_party_signed"), + QJsonObject _dataJson; + addParam<IfNotEmpty>(_dataJson, QStringLiteral("third_party_signed"), thirdPartySigned); - addParam<IfNotEmpty>(_data, QStringLiteral("reason"), reason); - setRequestData(std::move(_data)); + addParam<IfNotEmpty>(_dataJson, QStringLiteral("reason"), reason); + setRequestData({ _dataJson }); addExpectedKey("room_id"); } @@ -32,13 +32,13 @@ JoinRoomJob::JoinRoomJob(const QString& roomIdOrAlias, const Omittable<ThirdPartySigned>& thirdPartySigned, const QString& reason) : BaseJob(HttpVerb::Post, QStringLiteral("JoinRoomJob"), - makePath("/_matrix/client/r0", "/join/", roomIdOrAlias), + makePath("/_matrix/client/v3", "/join/", roomIdOrAlias), queryToJoinRoom(serverName)) { - QJsonObject _data; - addParam<IfNotEmpty>(_data, QStringLiteral("third_party_signed"), + QJsonObject _dataJson; + addParam<IfNotEmpty>(_dataJson, QStringLiteral("third_party_signed"), thirdPartySigned); - addParam<IfNotEmpty>(_data, QStringLiteral("reason"), reason); - setRequestData(std::move(_data)); + addParam<IfNotEmpty>(_dataJson, QStringLiteral("reason"), reason); + setRequestData({ _dataJson }); addExpectedKey("room_id"); } |