libQuotient
A Qt library for building matrix clients
Loading...
Searching...
No Matches
roommemberevent.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2015 Felix Rohrbach <kde@fxrh.de>
2// SPDX-FileCopyrightText: 2017 Kitsune Ral <Kitsune-Ral@users.sf.net>
3// SPDX-FileCopyrightText: 2019 Karol Kosek <krkkx@protonmail.com>
4// SPDX-License-Identifier: LGPL-2.1-or-later
5
6#pragma once
7
8#include "stateevent.h"
9#include <Quotient/quotient_common.h>
10
11namespace Quotient {
13public:
17
19 /// (Only for invites) Whether the invite is to a direct chat
20 bool isDirect = false;
24};
25
29public:
30 QUO_EVENT(RoomMemberEvent, "m.room.member")
31
32 static bool isValid(const QJsonObject& fullJson)
33 {
35 }
36
38
40 QString userId() const { return stateKey(); }
41 bool isDirect() const { return content().isDirect; }
44 QString reason() const { return content().reason; }
45 bool changesMembership() const;
46 bool isBan() const;
47 bool isUnban() const;
48 bool isInvite() const;
49 bool isRejectedInvite() const;
50 bool isJoin() const;
51 bool isLeave() const;
52 bool isRename() const;
53 bool isAvatarUpdate() const;
54};
55} // namespace Quotient
#define QUO_EVENT(CppType_, MatrixType_)
Supply event metatype information in (specific) event types.
Definition event.h:436
#define QUOTIENT_API