aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--room.cpp7
-rw-r--r--room.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/room.cpp b/room.cpp
index 48486ab8..dfca6bde 100644
--- a/room.cpp
+++ b/room.cpp
@@ -23,6 +23,7 @@
#include "jobs/generated/banning.h"
#include "jobs/generated/leaving.h"
#include "jobs/generated/receipts.h"
+#include "jobs/generated/redaction.h"
#include "jobs/setroomstatejob.h"
#include "events/simplestateevents.h"
#include "events/roomavatarevent.h"
@@ -671,6 +672,12 @@ void Room::unban(const QString& userId)
connection()->callApi<UnbanJob>(id(), userId);
}
+void Room::redactEvent(const QString& eventId, const QString& reason)
+{
+ connection()->callApi<RedactEventJob>(
+ id(), eventId, connection()->generateTxnId(), reason);
+}
+
void Room::Private::dropDuplicateEvents(RoomEvents* events) const
{
// Collect all duplicate events at the end of the container
diff --git a/room.h b/room.h
index bef66b86..989692de 100644
--- a/room.h
+++ b/room.h
@@ -181,6 +181,8 @@ namespace QMatrixClient
void kickMember(const QString& memberId, const QString& reason = {});
void ban(const QString& userId, const QString& reason = {});
void unban(const QString& userId);
+ void redactEvent(const QString& eventId,
+ const QString& reason = {});
/** Mark all messages in the room as read */
void markAllMessagesAsRead();