aboutsummaryrefslogtreecommitdiff
path: root/lib/room.h
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-11-27 11:23:22 +0100
committerGitHub <noreply@github.com>2021-11-27 11:23:22 +0100
commit17234b8d7ce59f757099ad7894d3a8d73b859f12 (patch)
tree5d47a587b851c6214f5b00290784554665c58c7b /lib/room.h
parent38eaa61b9fa8e0a04baa847824bb1e1280395a57 (diff)
parent9701f24ac0214e4d8bd7fe1d6d4fa542d75d3d18 (diff)
downloadlibquotient-17234b8d7ce59f757099ad7894d3a8d73b859f12.tar.gz
libquotient-17234b8d7ce59f757099ad7894d3a8d73b859f12.zip
Merge pull request #518 from Smittyvb/room-stateEvents
Diffstat (limited to 'lib/room.h')
-rw-r--r--lib/room.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/room.h b/lib/room.h
index 65217290..85c51a87 100644
--- a/lib/room.h
+++ b/lib/room.h
@@ -757,6 +757,19 @@ public:
Q_INVOKABLE const Quotient::StateEventBase*
getCurrentState(const QString& evtType, const QString& stateKey = {}) const;
+ /// Get all state events in the room.
+ /*! This method returns all known state events that have occured in
+ * the room, as a mapping from the event type and state key to value.
+ */
+ const QHash<StateEventKey, const StateEventBase*>& currentState() const;
+
+ /// Get all state events in the room of a certain type.
+ /*! This method returns all known state events that have occured in
+ * the room of the given type.
+ */
+ Q_INVOKABLE const QVector<const StateEventBase*>
+ stateEventsOfType(const QString& evtType) const;
+
/// Get a state event with the given event type and state key
/*! This is a typesafe overload that accepts a C++ event type instead of
* its Matrix name.