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