aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/redaction.h
diff options
context:
space:
mode:
authorAndres Salomon <dilinger@queued.net>2021-01-18 04:00:14 -0500
committerAndres Salomon <dilinger@queued.net>2021-01-18 04:00:14 -0500
commit09eb39236666e81d5da014acea011dcd74d0999b (patch)
tree52876d96be71be1a39d5d935c1295a51995e8949 /lib/csapi/redaction.h
parentf1788ee27f33e9339334e0d79bde9a27d9ce2e44 (diff)
parenta4e78956f105875625b572d8b98459ffa86fafe5 (diff)
downloadlibquotient-09eb39236666e81d5da014acea011dcd74d0999b.tar.gz
libquotient-09eb39236666e81d5da014acea011dcd74d0999b.zip
Update upstream source from tag 'upstream/0.6.4'
Update to upstream version '0.6.4' with Debian dir aa8705fd74743e79c043bc9e3e425d5064404cfe
Diffstat (limited to 'lib/csapi/redaction.h')
-rw-r--r--lib/csapi/redaction.h86
1 files changed, 41 insertions, 45 deletions
diff --git a/lib/csapi/redaction.h b/lib/csapi/redaction.h
index d02abfd0..541e433a 100644
--- a/lib/csapi/redaction.h
+++ b/lib/csapi/redaction.h
@@ -6,48 +6,44 @@
#include "jobs/basejob.h"
-
-namespace QMatrixClient
-{
- // Operations
-
- /// Strips all non-integrity-critical information out of an event.
- ///
- /// Strips all information out of an event which isn't critical to the
- /// integrity of the server-side representation of the room.
- ///
- /// This cannot be undone.
- ///
- /// Users may redact their own events, and any user with a power level
- /// greater than or equal to the `redact` power level of the room may
- /// redact events there.
- class RedactEventJob : public BaseJob
- {
- public:
- /*! Strips all non-integrity-critical information out of an event.
- * \param roomId
- * The room from which to redact the event.
- * \param eventId
- * The ID of the event to redact
- * \param txnId
- * The transaction ID for this event. Clients should generate a
- * unique ID; it will be used by the server to ensure idempotency of requests.
- * \param reason
- * The reason for the event being redacted.
- */
- explicit RedactEventJob(const QString& roomId, const QString& eventId, const QString& txnId, const QString& reason = {});
- ~RedactEventJob() override;
-
- // Result properties
-
- /// A unique identifier for the event.
- const QString& eventId() const;
-
- protected:
- Status parseJson(const QJsonDocument& data) override;
-
- private:
- class Private;
- QScopedPointer<Private> d;
- };
-} // namespace QMatrixClient
+namespace Quotient {
+
+/*! \brief Strips all non-integrity-critical information out of an event.
+ *
+ * Strips all information out of an event which isn't critical to the
+ * integrity of the server-side representation of the room.
+ *
+ * This cannot be undone.
+ *
+ * Users may redact their own events, and any user with a power level
+ * greater than or equal to the ``redact`` power level of the room may
+ * redact events there.
+ */
+class RedactEventJob : public BaseJob {
+public:
+ /*! \brief Strips all non-integrity-critical information out of an event.
+ *
+ * \param roomId
+ * The room from which to redact the event.
+ *
+ * \param eventId
+ * The ID of the event to redact
+ *
+ * \param txnId
+ * The transaction ID for this event. Clients should generate a
+ * unique ID; it will be used by the server to ensure idempotency of
+ * requests.
+ *
+ * \param reason
+ * The reason for the event being redacted.
+ */
+ explicit RedactEventJob(const QString& roomId, const QString& eventId,
+ const QString& txnId, const QString& reason = {});
+
+ // Result properties
+
+ /// A unique identifier for the event.
+ QString eventId() const { return loadFromJson<QString>("event_id"_ls); }
+};
+
+} // namespace Quotient