aboutsummaryrefslogtreecommitdiff
path: root/lib/jobs
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-08-16 13:40:09 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2019-08-16 13:40:09 +0900
commit8663c2e78407a0c0df872eaf9bb6b41de2fbdc9e (patch)
tree1f01ce61233a094df74a65c210c180b280bc6774 /lib/jobs
parentfadce11be92abe76cecfe6356b3b38f25dd93e8d (diff)
downloadlibquotient-8663c2e78407a0c0df872eaf9bb6b41de2fbdc9e.tar.gz
libquotient-8663c2e78407a0c0df872eaf9bb6b41de2fbdc9e.zip
BaseJob: support M_USER_DEACTIVATED error code
Closes #344.
Diffstat (limited to 'lib/jobs')
-rw-r--r--lib/jobs/basejob.cpp2
-rw-r--r--lib/jobs/basejob.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/jobs/basejob.cpp b/lib/jobs/basejob.cpp
index 5930e8b8..f3ba00b5 100644
--- a/lib/jobs/basejob.cpp
+++ b/lib/jobs/basejob.cpp
@@ -429,6 +429,8 @@ BaseJob::Status BaseJob::parseError(QNetworkReply* reply,
if (errCode == "M_CANNOT_LEAVE_SERVER_NOTICE_ROOM")
return { CannotLeaveRoom,
tr("It's not allowed to leave a server notices room") };
+ if (errCode == "M_USER_DEACTIVATED")
+ return { UserDeactivated };
// Not localisable on the client side
if (errorJson.contains("error"_ls))
diff --git a/lib/jobs/basejob.h b/lib/jobs/basejob.h
index 68467d48..fd7beca0 100644
--- a/lib/jobs/basejob.h
+++ b/lib/jobs/basejob.h
@@ -77,6 +77,7 @@ public:
UserConsentRequired,
UserConsentRequiredError = UserConsentRequired,
CannotLeaveRoom,
+ UserDeactivated,
UserDefinedError = 256
};