1/******************************************************************************
2 * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
3 */
4
5#pragma once
6
7#include <Quotient/csapi/definitions/third_party_signed.h>
8
9#include <Quotient/jobs/basejob.h>
10
11namespace Quotient {
12
13/*! \brief Start the requesting user participating in a particular room.
14 *
15 * *Note that this API requires a room ID, not alias.*
16 * `/join/{roomIdOrAlias}` *exists if you have a room alias.*
17 *
18 * This API starts a user participating in a particular room, if that user
19 * is allowed to participate in that room. After this call, the client is
20 * allowed to see all current state events in the room, and all subsequent
21 * events associated with the room until the user leaves the room.
22 *
23 * After a user has joined a room, the room will appear as an entry in the
24 * response of the
25 * [`/initialSync`](/client-server-api/#get_matrixclientv3initialsync) and
26 * [`/sync`](/client-server-api/#get_matrixclientv3sync) APIs.
27 */
28class QUOTIENT_API JoinRoomByIdJob : public BaseJob {
29public:
30 /*! \brief Start the requesting user participating in a particular room.
31 *
32 * \param roomId
33 * The room identifier (not alias) to join.
34 *
35 * \param thirdPartySigned
36 * If supplied, the homeserver must verify that it matches a pending
37 * `m.room.third_party_invite` event in the room, and perform
38 * key validity checking if required by the event.
39 *
40 * \param reason
41 * Optional reason to be included as the `reason` on the subsequent
42 * membership event.
43 */
44 explicit JoinRoomByIdJob(
45 const QString& roomId,
46 const Omittable<ThirdPartySigned>& thirdPartySigned = none,
47 const QString& reason = {});
48
49 // Result properties
50
51 /// The joined room ID.
52 QString roomId() const { return loadFromJson<QString>(keyName: "room_id"_ls); }
53};
54
55/*! \brief Start the requesting user participating in a particular room.
56 *
57 * *Note that this API takes either a room ID or alias, unlike*
58 * `/rooms/{roomId}/join`.
59 *
60 * This API starts a user participating in a particular room, if that user
61 * is allowed to participate in that room. After this call, the client is
62 * allowed to see all current state events in the room, and all subsequent
63 * events associated with the room until the user leaves the room.
64 *
65 * After a user has joined a room, the room will appear as an entry in the
66 * response of the
67 * [`/initialSync`](/client-server-api/#get_matrixclientv3initialsync) and
68 * [`/sync`](/client-server-api/#get_matrixclientv3sync) APIs.
69 */
70class QUOTIENT_API JoinRoomJob : public BaseJob {
71public:
72 /*! \brief Start the requesting user participating in a particular room.
73 *
74 * \param roomIdOrAlias
75 * The room identifier or alias to join.
76 *
77 * \param serverName
78 * The servers to attempt to join the room through. One of the servers
79 * must be participating in the room.
80 *
81 * \param thirdPartySigned
82 * If a `third_party_signed` was supplied, the homeserver must verify
83 * that it matches a pending `m.room.third_party_invite` event in the
84 * room, and perform key validity checking if required by the event.
85 *
86 * \param reason
87 * Optional reason to be included as the `reason` on the subsequent
88 * membership event.
89 */
90 explicit JoinRoomJob(
91 const QString& roomIdOrAlias, const QStringList& serverName = {},
92 const Omittable<ThirdPartySigned>& thirdPartySigned = none,
93 const QString& reason = {});
94
95 // Result properties
96
97 /// The joined room ID.
98 QString roomId() const { return loadFromJson<QString>(keyName: "room_id"_ls); }
99};
100
101} // namespace Quotient
102