5 #include <Quotient/jobs/basejob.h>
52 QString emailAddress{};
57 explicit GetWellknownSupportJob();
63 static QUrl makeRequestUrl(
const HomeserverData& hsData);
72 QVector<Contact> contacts()
const {
return loadFromJson<QVector<Contact>>(
"contacts"_L1); }
78 QString supportPage()
const {
return loadFromJson<QString>(
"support_page"_L1); }
86 QVector<Contact> contacts{};
92 QString supportPage{};
96 template <std::derived_from<GetWellknownSupportJob> JobT>
97 constexpr inline auto doCollectResponse<JobT> =
98 [](JobT* j) -> GetWellknownSupportJob::Response {
return { j->contacts(), j->supportPage() }; };
101 struct QUOTIENT_API JsonObjectConverter<GetWellknownSupportJob::Contact> {
102 static void fillFrom(
const QJsonObject& jo, GetWellknownSupportJob::Contact& result)
104 fillFromJson(jo.value(
"role"_L1), result.role);
105 fillFromJson(jo.value(
"matrix_id"_L1), result.matrixId);
106 fillFromJson(jo.value(
"email_address"_L1), result.emailAddress);