aboutsummaryrefslogtreecommitdiff
path: root/lib/jobs
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2020-03-23 08:56:01 +0100
committerKitsune Ral <Kitsune-Ral@users.sf.net>2020-03-25 22:35:23 +0100
commitdc53839b2afd2e1ee5af882924a1c0a5b553da4e (patch)
tree851ef96132d827f5204229c12d988fcc31b00b43 /lib/jobs
parentfb63012ec32c98c663802951153207442d1d63df (diff)
downloadlibquotient-dc53839b2afd2e1ee5af882924a1c0a5b553da4e.tar.gz
libquotient-dc53839b2afd2e1ee5af882924a1c0a5b553da4e.zip
Support for server notices rooms (MSC1452)
Fixes #326.
Diffstat (limited to 'lib/jobs')
-rw-r--r--lib/jobs/basejob.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/jobs/basejob.cpp b/lib/jobs/basejob.cpp
index 0d9b9f10..5af37902 100644
--- a/lib/jobs/basejob.cpp
+++ b/lib/jobs/basejob.cpp
@@ -333,7 +333,11 @@ void BaseJob::gotReply()
d->status.message =
tr("Requested room version: %1")
.arg(json.value("room_version").toString());
- } else if (!json.isEmpty()) // Not localisable on the client side
+ }
+ else if (errCode == "M_CANNOT_LEAVE_SERVER_NOTICE_ROOM")
+ setStatus(IncorrectRequestError,
+ tr("It's not allowed to leave a server notices room"));
+ else if (!json.isEmpty()) // Not localisable on the client side
setStatus(d->status.code, json.value("error"_ls).toString());
}
}