diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-12-10 15:37:41 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-12-10 16:22:27 +0900 |
commit | d8a7d9cbef6d90b6b15ffbf26bf43f5555dbaefd (patch) | |
tree | 16f0d7c023ce6f9be626b11c0f54d9bdf470f003 | |
parent | df7f9bd2c26ca67fb3d221f9d3a68e34fb25a235 (diff) | |
download | libquotient-d8a7d9cbef6d90b6b15ffbf26bf43f5555dbaefd.tar.gz libquotient-d8a7d9cbef6d90b6b15ffbf26bf43f5555dbaefd.zip |
Enable sending requests for redaction to the server
Closes #118
-rw-r--r-- | room.cpp | 7 | ||||
-rw-r--r-- | room.h | 2 |
2 files changed, 9 insertions, 0 deletions
@@ -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 @@ -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(); |