Skip to content

Commit

Permalink
BaseJob: support M_USER_DEACTIVATED error code
Browse files Browse the repository at this point in the history
Backport for #344.
  • Loading branch information
KitsuneRal committed Mar 23, 2020
1 parent ffdd48b commit 40dc253
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/jobs/basejob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down

0 comments on commit 40dc253

Please sign in to comment.