libQuotient
A Qt library for building matrix clients
Loading...
Searching...
No Matches
redaction.h
Go to the documentation of this file.
1// THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
2
3#pragma once
4
5#include <Quotient/jobs/basejob.h>
6
7namespace Quotient {
8
9//! \brief Strips all non-integrity-critical information out of an event.
10//!
11//! Strips all information out of an event which isn't critical to the
12//! integrity of the server-side representation of the room.
13//!
14//! This cannot be undone.
15//!
16//! Any user with a power level greater than or equal to the `m.room.redaction`
17//! event power level may send redaction events in the room. If the user's power
18//! level greater is also greater than or equal to the `redact` power level
19//! of the room, the user may redact events sent by other users.
20//!
21//! Server administrators may redact events sent by users on their server.
23public:
24 //! \param roomId
25 //! The room from which to redact the event.
26 //!
27 //! \param eventId
28 //! The ID of the event to redact
29 //!
30 //! \param txnId
31 //! The [transaction ID](/client-server-api/#transaction-identifiers) for this event. Clients
32 //! should generate a unique ID; it will be used by the server to ensure idempotency of
33 //! requests.
34 //!
35 //! \param reason
36 //! The reason for the event being redacted.
37 explicit RedactEventJob(const QString& roomId, const QString& eventId, const QString& txnId,
38 const QString& reason = {});
39
40 // Result properties
41
42 //! A unique identifier for the event.
43 QString eventId() const { return loadFromJson<QString>("event_id"_L1); }
44};
45
46inline auto collectResponse(const RedactEventJob* job) { return job->eventId(); }
47
48} // namespace Quotient
Strips all non-integrity-critical information out of an event.
Definition redaction.h:22
auto collectResponse(const GetAccountDataJob *job)
#define QUOTIENT_API