6 #include <Quotient/converters.h>
10 constexpr inline auto RelatesToKey =
"m.relates_to"_ls;
11 constexpr inline auto RelTypeKey =
"rel_type"_ls;
14 using reltypeid_t = QLatin1String;
20 static constexpr auto ReplyType =
"m.in_reply_to"_ls;
21 static constexpr auto AnnotationType =
"m.annotation"_ls;
22 static constexpr auto ReplacementType =
"m.replace"_ls;
24 static EventRelation replyTo(QString eventId)
26 return { ReplyType, std::move(eventId) };
28 static EventRelation annotate(QString eventId, QString key)
30 return { AnnotationType, std::move(eventId), std::move(key) };
32 static EventRelation replace(QString eventId)
34 return { ReplacementType, std::move(eventId) };
40 static void dumpTo(QJsonObject& jo,
const EventRelation& pod);
41 static void fillFrom(
const QJsonObject& jo, EventRelation& pod);