libQuotient
A Qt library for building matrix clients
Loading...
Searching...
No Matches
redactionevent.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2017 Kitsune Ral <kitsune-ral@users.sf.net>
2// SPDX-License-Identifier: LGPL-2.1-or-later
3
4#pragma once
5
6#include "roomevent.h"
7
8namespace Quotient {
9class QUOTIENT_API RedactionEvent : public RoomEvent {
10public:
11 QUO_EVENT(RedactionEvent, "m.room.redaction")
12
13 using RoomEvent::RoomEvent;
14
15 QString redactedEvent() const
16 {
17 return fullJson()["redacts"_L1].toString();
18 }
19 QUO_CONTENT_GETTER(QString, reason)
20};
21} // namespace Quotient
#define QUO_CONTENT_GETTER(PartType_, PartName_)
Define an inline method obtaining a content part.
Definition event.h:465
#define QUO_EVENT(CppType_, MatrixType_)
Supply event metatype information in (specific) event types.
Definition event.h:436
#define QUOTIENT_API