Skip to content

Commit

Permalink
BaseJob: support M_USER_DEACTIVATED error code
Browse files Browse the repository at this point in the history
Closes #344.
  • Loading branch information
KitsuneRal committed Aug 16, 2019
1 parent fadce11 commit 8663c2e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/jobs/basejob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
1 change: 1 addition & 0 deletions lib/jobs/basejob.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ class BaseJob : public QObject {
UserConsentRequired,
UserConsentRequiredError = UserConsentRequired,
CannotLeaveRoom,
UserDeactivated,
UserDefinedError = 256
};

Expand Down

0 comments on commit 8663c2e

Please sign in to comment.