diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-08-13 20:28:56 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-08-13 20:28:56 +0900 |
commit | fadce11be92abe76cecfe6356b3b38f25dd93e8d (patch) | |
tree | 4bbe8263daeec7cd5ac3ff1366cdb23c03aab8d9 /lib/jobs/basejob.cpp | |
parent | 18cb395868f448a34dacd55a0b7b5c5eb9f06e27 (diff) | |
download | libquotient-fadce11be92abe76cecfe6356b3b38f25dd93e8d.tar.gz libquotient-fadce11be92abe76cecfe6356b3b38f25dd93e8d.zip |
Support for server notices rooms (MSC1452)
Closes #326.
Diffstat (limited to 'lib/jobs/basejob.cpp')
-rw-r--r-- | lib/jobs/basejob.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/jobs/basejob.cpp b/lib/jobs/basejob.cpp index ec6b8375..5930e8b8 100644 --- a/lib/jobs/basejob.cpp +++ b/lib/jobs/basejob.cpp @@ -426,6 +426,9 @@ BaseJob::Status BaseJob::parseError(QNetworkReply* reply, ? tr("Requested room version: %1") .arg(errorJson.value("room_version"_ls).toString()) : errorJson.value("error"_ls).toString() }; + if (errCode == "M_CANNOT_LEAVE_SERVER_NOTICE_ROOM") + return { CannotLeaveRoom, + tr("It's not allowed to leave a server notices room") }; // Not localisable on the client side if (errorJson.contains("error"_ls)) |