5 #include <Quotient/jobs/basejob.h>
65 QString idAccessToken;
168 explicit CreateRoomJob(
const QString& visibility = {},
const QString& roomAliasName = {},
169 const QString& name = {},
const QString& topic = {},
170 const QStringList& invite = {},
171 const QVector<Invite3pid>& invite3pid = {},
172 const QString& roomVersion = {},
const QJsonObject& creationContent = {},
173 const QVector<StateEvent>& initialState = {},
const QString& preset = {},
174 std::optional<
bool> isDirect = std::nullopt,
175 const QJsonObject& powerLevelContentOverride = {});
180 QString roomId()
const {
return loadFromJson<QString>(
"room_id"_L1); }
183 inline auto collectResponse(
const CreateRoomJob* job) {
return job->roomId(); }
186 struct QUOTIENT_API JsonObjectConverter<CreateRoomJob::Invite3pid> {
187 static void dumpTo(QJsonObject& jo,
const CreateRoomJob::Invite3pid& pod)
189 addParam<>(jo,
"id_server"_L1, pod.idServer);
190 addParam<>(jo,
"id_access_token"_L1, pod.idAccessToken);
191 addParam<>(jo,
"medium"_L1, pod.medium);
192 addParam<>(jo,
"address"_L1, pod.address);
197 struct QUOTIENT_API JsonObjectConverter<CreateRoomJob::StateEvent> {
198 static void dumpTo(QJsonObject& jo,
const CreateRoomJob::StateEvent& pod)
200 addParam<>(jo,
"type"_L1, pod.type);
201 addParam<>(jo,
"content"_L1, pod.content);
202 addParam<IfNotEmpty>(jo,
"state_key"_L1, pod.stateKey);