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 Ban a user in the room. |
12 | * |
13 | * Ban a user in the room. If the user is currently in the room, also kick them. |
14 | * |
15 | * When a user is banned from a room, they may not join it or be invited to it |
16 | * until they are unbanned. |
17 | * |
18 | * The caller must have the required power level in order to perform this |
19 | * operation. |
20 | */ |
21 | class QUOTIENT_API BanJob : public BaseJob { |
22 | public: |
23 | /*! \brief Ban a user in the room. |
24 | * |
25 | * \param roomId |
26 | * The room identifier (not alias) from which the user should be banned. |
27 | * |
28 | * \param userId |
29 | * The fully qualified user ID of the user being banned. |
30 | * |
31 | * \param reason |
32 | * The reason the user has been banned. This will be supplied as the |
33 | * `reason` on the target's updated |
34 | * [`m.room.member`](/client-server-api/#mroommember) event. |
35 | */ |
36 | explicit BanJob(const QString& roomId, const QString& userId, |
37 | const QString& reason = {}); |
38 | }; |
39 | |
40 | /*! \brief Unban a user from the room. |
41 | * |
42 | * Unban a user from the room. This allows them to be invited to the room, |
43 | * and join if they would otherwise be allowed to join according to its join |
44 | * rules. |
45 | * |
46 | * The caller must have the required power level in order to perform this |
47 | * operation. |
48 | */ |
49 | class QUOTIENT_API UnbanJob : public BaseJob { |
50 | public: |
51 | /*! \brief Unban a user from the room. |
52 | * |
53 | * \param roomId |
54 | * The room identifier (not alias) from which the user should be unbanned. |
55 | * |
56 | * \param userId |
57 | * The fully qualified user ID of the user being unbanned. |
58 | * |
59 | * \param reason |
60 | * Optional reason to be included as the `reason` on the subsequent |
61 | * membership event. |
62 | */ |
63 | explicit UnbanJob(const QString& roomId, const QString& userId, |
64 | const QString& reason = {}); |
65 | }; |
66 | |
67 | } // namespace Quotient |
68 | |