aboutsummaryrefslogtreecommitdiff
path: root/lib/jobs/basejob.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/jobs/basejob.cpp')
-rw-r--r--lib/jobs/basejob.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/jobs/basejob.cpp b/lib/jobs/basejob.cpp
index 4a7780b1..628d10ec 100644
--- a/lib/jobs/basejob.cpp
+++ b/lib/jobs/basejob.cpp
@@ -325,7 +325,15 @@ void BaseJob::gotReply()
d->status.code = UserConsentRequiredError;
d->errorUrl = json.value("consent_uri"_ls).toString();
}
- else if (!json.isEmpty()) // Not localisable on the client side
+ else if (errCode == "M_UNSUPPORTED_ROOM_VERSION" ||
+ errCode == "M_INCOMPATIBLE_ROOM_VERSION")
+ {
+ d->status.code = UnsupportedRoomVersionError;
+ if (json.contains("room_version"))
+ d->status.message =
+ tr("Requested room version: %1")
+ .arg(json.value("room_version").toString());
+ } else if (!json.isEmpty()) // Not localisable on the client side
setStatus(IncorrectRequestError,
json.value("error"_ls).toString());
}
@@ -568,6 +576,8 @@ QString BaseJob::statusCaption() const
return tr("Network authentication required");
case UserConsentRequiredError:
return tr("User consent required");
+ case UnsupportedRoomVersionError:
+ return tr("The server does not support the needed room version");
default:
return tr("Request failed");
}