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 Send a message event to the given room. |
12 | * |
13 | * This endpoint is used to send a message event to a room. Message events |
14 | * allow access to historical events and pagination, making them suited |
15 | * for "once-off" activity in a room. |
16 | * |
17 | * The body of the request should be the content object of the event; the |
18 | * fields in this object will vary depending on the type of event. See |
19 | * [Room Events](/client-server-api/#room-events) for the m. event |
20 | * specification. |
21 | */ |
22 | class QUOTIENT_API SendMessageJob : public BaseJob { |
23 | public: |
24 | /*! \brief Send a message event to the given room. |
25 | * |
26 | * \param roomId |
27 | * The room to send the event to. |
28 | * |
29 | * \param eventType |
30 | * The type of event to send. |
31 | * |
32 | * \param txnId |
33 | * The [transaction ID](/client-server-api/#transaction-identifiers) for |
34 | * this event. Clients should generate an ID unique across requests with the |
35 | * same access token; it will be used by the server to ensure idempotency of |
36 | * requests. |
37 | * |
38 | * \param body |
39 | * This endpoint is used to send a message event to a room. Message events |
40 | * allow access to historical events and pagination, making them suited |
41 | * for "once-off" activity in a room. |
42 | * |
43 | * The body of the request should be the content object of the event; the |
44 | * fields in this object will vary depending on the type of event. See |
45 | * [Room Events](/client-server-api/#room-events) for the m. event |
46 | * specification. |
47 | */ |
48 | explicit SendMessageJob(const QString& roomId, const QString& eventType, |
49 | const QString& txnId, const QJsonObject& body = {}); |
50 | |
51 | // Result properties |
52 | |
53 | /// A unique identifier for the event. |
54 | QString eventId() const { return loadFromJson<QString>(keyName: "event_id"_ls ); } |
55 | }; |
56 | |
57 | } // namespace Quotient |
58 | |