aboutsummaryrefslogtreecommitdiff
path: root/lib/events/roommemberevent.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-12-24 11:26:11 +0300
committerKitsune Ral <Kitsune-Ral@users.sf.net>2019-12-24 11:26:11 +0300
commit0373153481e4a08f1dfb194e672188d74ce07d85 (patch)
tree4527748fdc738ce71bfc18b6e063e9a150528649 /lib/events/roommemberevent.h
parent79b9f6d928cbd516a610d845891f4054df05e0c4 (diff)
downloadlibquotient-0373153481e4a08f1dfb194e672188d74ce07d85.tar.gz
libquotient-0373153481e4a08f1dfb194e672188d74ce07d85.zip
RoomMemberEvent: introduce the reason field (MSC2367)
See https://github.com/matrix-org/matrix-doc/pull/2367. Closes #370.
Diffstat (limited to 'lib/events/roommemberevent.h')
-rw-r--r--lib/events/roommemberevent.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/events/roommemberevent.h b/lib/events/roommemberevent.h
index 6a34fd7f..0ca439e1 100644
--- a/lib/events/roommemberevent.h
+++ b/lib/events/roommemberevent.h
@@ -40,6 +40,7 @@ public:
bool isDirect = false;
QString displayName;
QUrl avatarUrl;
+ QString reason;
protected:
void fillJson(QJsonObject* o) const override;
@@ -56,8 +57,8 @@ public:
explicit RoomMemberEvent(const QJsonObject& obj) : StateEvent(typeId(), obj)
{}
- [[deprecated("Use RoomMemberEvent(userId, contentArgs) "
- "instead")]] RoomMemberEvent(MemberEventContent&& c)
+ [[deprecated("Use RoomMemberEvent(userId, contentArgs) instead")]]
+ RoomMemberEvent(MemberEventContent&& c)
: StateEvent(typeId(), matrixTypeId(), QString(), c)
{}
template <typename... ArgTs>
@@ -85,6 +86,8 @@ public:
bool isDirect() const { return content().isDirect; }
QString displayName() const { return content().displayName; }
QUrl avatarUrl() const { return content().avatarUrl; }
+ QString reason() const { return content().reason; }
+ bool changesMembership() const;
bool isInvite() const;
bool isJoin() const;
bool isLeave() const;