aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2020-03-23 10:40:19 +0100
committerKitsune Ral <Kitsune-Ral@users.sf.net>2020-03-25 22:35:23 +0100
commitf7442619401fa789647101f56fdfbddaf4fc6796 (patch)
tree4757bff368e28b94d37dd08add73b64821a82c20 /lib
parent94581d2a55853e91e117301b408446d9426ef8e6 (diff)
downloadlibquotient-f7442619401fa789647101f56fdfbddaf4fc6796.tar.gz
libquotient-f7442619401fa789647101f56fdfbddaf4fc6796.zip
BaseJob: support M_USER_DEACTIVATED error code
Backport for #344.
Diffstat (limited to 'lib')
-rw-r--r--lib/jobs/basejob.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/jobs/basejob.cpp b/lib/jobs/basejob.cpp
index 5af37902..a6225c67 100644
--- a/lib/jobs/basejob.cpp
+++ b/lib/jobs/basejob.cpp
@@ -337,6 +337,9 @@ void BaseJob::gotReply()
else if (errCode == "M_CANNOT_LEAVE_SERVER_NOTICE_ROOM")
setStatus(IncorrectRequestError,
tr("It's not allowed to leave a server notices room"));
+ else if (errCode == "M_USER_DEACTIVATED")
+ setStatus(ContentAccessError,
+ tr("The user has been deactivated"));
else if (!json.isEmpty()) // Not localisable on the client side
setStatus(d->status.code, json.value("error"_ls).toString());
}