diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-11-27 11:23:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-27 11:23:22 +0100 |
commit | 17234b8d7ce59f757099ad7894d3a8d73b859f12 (patch) | |
tree | 5d47a587b851c6214f5b00290784554665c58c7b /lib/room.h | |
parent | 38eaa61b9fa8e0a04baa847824bb1e1280395a57 (diff) | |
parent | 9701f24ac0214e4d8bd7fe1d6d4fa542d75d3d18 (diff) | |
download | libquotient-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.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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. |