aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/create_room.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csapi/create_room.cpp')
-rw-r--r--lib/csapi/create_room.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/lib/csapi/create_room.cpp b/lib/csapi/create_room.cpp
index 68741f13..ec2a1855 100644
--- a/lib/csapi/create_room.cpp
+++ b/lib/csapi/create_room.cpp
@@ -13,12 +13,10 @@ using namespace Quotient;
static const auto basePath = QStringLiteral("/_matrix/client/r0");
// Converters
-namespace Quotient
-{
+namespace Quotient {
template <>
-struct JsonObjectConverter<CreateRoomJob::Invite3pid>
-{
+struct JsonObjectConverter<CreateRoomJob::Invite3pid> {
static void dumpTo(QJsonObject& jo, const CreateRoomJob::Invite3pid& pod)
{
addParam<>(jo, QStringLiteral("id_server"), pod.idServer);
@@ -28,8 +26,7 @@ struct JsonObjectConverter<CreateRoomJob::Invite3pid>
};
template <>
-struct JsonObjectConverter<CreateRoomJob::StateEvent>
-{
+struct JsonObjectConverter<CreateRoomJob::StateEvent> {
static void dumpTo(QJsonObject& jo, const CreateRoomJob::StateEvent& pod)
{
addParam<>(jo, QStringLiteral("type"), pod.type);
@@ -40,14 +37,11 @@ struct JsonObjectConverter<CreateRoomJob::StateEvent>
} // namespace Quotient
-class CreateRoomJob::Private
-{
+class CreateRoomJob::Private {
public:
QString roomId;
};
-static const auto CreateRoomJobName = QStringLiteral("CreateRoomJob");
-
CreateRoomJob::CreateRoomJob(const QString& visibility,
const QString& roomAliasName, const QString& name,
const QString& topic, const QStringList& invite,
@@ -57,7 +51,8 @@ CreateRoomJob::CreateRoomJob(const QString& visibility,
const QVector<StateEvent>& initialState,
const QString& preset, Omittable<bool> isDirect,
const QJsonObject& powerLevelContentOverride)
- : BaseJob(HttpVerb::Post, CreateRoomJobName, basePath % "/createRoom")
+ : BaseJob(HttpVerb::Post, QStringLiteral("CreateRoomJob"),
+ basePath % "/createRoom")
, d(new Private)
{
QJsonObject _data;