12 :
public EventTemplate<
13 ReactionEvent, RoomEvent,
14 EventContent::SingleKeyValue<EventRelation, RelatesToKey>> {
17 static bool isValid(
const QJsonObject& fullJson)
19 return fullJson[ContentKey][RelatesToKey][RelTypeKey].toString()
20 == EventRelation::AnnotationType;
23 ReactionEvent(
const QString& eventId,
const QString& reactionKey)
24 : EventTemplate(EventRelation::annotate(eventId, reactionKey))
27 QString eventId()
const {
return content().value.eventId; }
28 QString key()
const {
return content().value.key; }
31 explicit ReactionEvent(
const QJsonObject& json) : EventTemplate(json) {}