aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/list_joined_rooms.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csapi/list_joined_rooms.cpp')
-rw-r--r--lib/csapi/list_joined_rooms.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/csapi/list_joined_rooms.cpp b/lib/csapi/list_joined_rooms.cpp
index 82ec8849..a745dba1 100644
--- a/lib/csapi/list_joined_rooms.cpp
+++ b/lib/csapi/list_joined_rooms.cpp
@@ -24,8 +24,10 @@ QUrl GetJoinedRoomsJob::makeRequestUrl(QUrl baseUrl)
basePath % "/joined_rooms");
}
+static const auto GetJoinedRoomsJobName = QStringLiteral("GetJoinedRoomsJob");
+
GetJoinedRoomsJob::GetJoinedRoomsJob()
- : BaseJob(HttpVerb::Get, "GetJoinedRoomsJob",
+ : BaseJob(HttpVerb::Get, GetJoinedRoomsJobName,
basePath % "/joined_rooms")
, d(new Private)
{
@@ -41,10 +43,10 @@ const QStringList& GetJoinedRoomsJob::joinedRooms() const
BaseJob::Status GetJoinedRoomsJob::parseJson(const QJsonDocument& data)
{
auto json = data.object();
- if (!json.contains("joined_rooms"))
+ if (!json.contains("joined_rooms"_ls))
return { JsonParseError,
"The key 'joined_rooms' not found in the response" };
- d->joinedRooms = fromJson<QStringList>(json.value("joined_rooms"));
+ d->joinedRooms = fromJson<QStringList>(json.value("joined_rooms"_ls));
return Success;
}