aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/registration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csapi/registration.cpp')
-rw-r--r--lib/csapi/registration.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/lib/csapi/registration.cpp b/lib/csapi/registration.cpp
index 153abcee..aa4b4fad 100644
--- a/lib/csapi/registration.cpp
+++ b/lib/csapi/registration.cpp
@@ -20,7 +20,7 @@ RegisterJob::RegisterJob(const QString& kind,
const QString& initialDeviceDisplayName,
Omittable<bool> inhibitLogin)
: BaseJob(HttpVerb::Post, QStringLiteral("RegisterJob"),
- makePath("/_matrix/client/r0", "/register"),
+ makePath("/_matrix/client/v3", "/register"),
queryToRegister(kind), {}, false)
{
QJsonObject _data;
@@ -38,7 +38,7 @@ RegisterJob::RegisterJob(const QString& kind,
RequestTokenToRegisterEmailJob::RequestTokenToRegisterEmailJob(
const EmailValidationData& body)
: BaseJob(HttpVerb::Post, QStringLiteral("RequestTokenToRegisterEmailJob"),
- makePath("/_matrix/client/r0", "/register/email/requestToken"),
+ makePath("/_matrix/client/v3", "/register/email/requestToken"),
false)
{
setRequestData(RequestData(toJson(body)));
@@ -47,7 +47,7 @@ RequestTokenToRegisterEmailJob::RequestTokenToRegisterEmailJob(
RequestTokenToRegisterMSISDNJob::RequestTokenToRegisterMSISDNJob(
const MsisdnValidationData& body)
: BaseJob(HttpVerb::Post, QStringLiteral("RequestTokenToRegisterMSISDNJob"),
- makePath("/_matrix/client/r0", "/register/msisdn/requestToken"),
+ makePath("/_matrix/client/v3", "/register/msisdn/requestToken"),
false)
{
setRequestData(RequestData(toJson(body)));
@@ -57,7 +57,7 @@ ChangePasswordJob::ChangePasswordJob(const QString& newPassword,
bool logoutDevices,
const Omittable<AuthenticationData>& auth)
: BaseJob(HttpVerb::Post, QStringLiteral("ChangePasswordJob"),
- makePath("/_matrix/client/r0", "/account/password"))
+ makePath("/_matrix/client/v3", "/account/password"))
{
QJsonObject _data;
addParam<>(_data, QStringLiteral("new_password"), newPassword);
@@ -70,7 +70,7 @@ RequestTokenToResetPasswordEmailJob::RequestTokenToResetPasswordEmailJob(
const EmailValidationData& body)
: BaseJob(HttpVerb::Post,
QStringLiteral("RequestTokenToResetPasswordEmailJob"),
- makePath("/_matrix/client/r0",
+ makePath("/_matrix/client/v3",
"/account/password/email/requestToken"),
false)
{
@@ -81,7 +81,7 @@ RequestTokenToResetPasswordMSISDNJob::RequestTokenToResetPasswordMSISDNJob(
const MsisdnValidationData& body)
: BaseJob(HttpVerb::Post,
QStringLiteral("RequestTokenToResetPasswordMSISDNJob"),
- makePath("/_matrix/client/r0",
+ makePath("/_matrix/client/v3",
"/account/password/msisdn/requestToken"),
false)
{
@@ -91,7 +91,7 @@ RequestTokenToResetPasswordMSISDNJob::RequestTokenToResetPasswordMSISDNJob(
DeactivateAccountJob::DeactivateAccountJob(
const Omittable<AuthenticationData>& auth, const QString& idServer)
: BaseJob(HttpVerb::Post, QStringLiteral("DeactivateAccountJob"),
- makePath("/_matrix/client/r0", "/account/deactivate"))
+ makePath("/_matrix/client/v3", "/account/deactivate"))
{
QJsonObject _data;
addParam<IfNotEmpty>(_data, QStringLiteral("auth"), auth);
@@ -111,13 +111,14 @@ QUrl CheckUsernameAvailabilityJob::makeRequestUrl(QUrl baseUrl,
const QString& username)
{
return BaseJob::makeRequestUrl(std::move(baseUrl),
- makePath("/_matrix/client/r0",
+ makePath("/_matrix/client/v3",
"/register/available"),
queryToCheckUsernameAvailability(username));
}
-CheckUsernameAvailabilityJob::CheckUsernameAvailabilityJob(const QString& username)
+CheckUsernameAvailabilityJob::CheckUsernameAvailabilityJob(
+ const QString& username)
: BaseJob(HttpVerb::Get, QStringLiteral("CheckUsernameAvailabilityJob"),
- makePath("/_matrix/client/r0", "/register/available"),
+ makePath("/_matrix/client/v3", "/register/available"),
queryToCheckUsernameAvailability(username), {}, false)
{}