diff options
Diffstat (limited to 'lib/room.cpp')
-rw-r--r-- | lib/room.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/room.cpp b/lib/room.cpp index 284eacd1..fac24e5e 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -226,6 +226,17 @@ public: return evt; } + QVector<const StateEventBase*> stateEventsOfType(const QString& evtType) const + { + QVector<const StateEventBase*> vals = QVector<const StateEventBase*>(); + for (const auto* val : currentState) { + if (val->matrixType() == evtType) { + vals.append(val); + } + } + return vals; + } + template <typename EventT> const EventT* getCurrentState(const QString& stateKey = {}) const { @@ -1455,6 +1466,17 @@ const StateEventBase* Room::getCurrentState(const QString& evtType, return d->getCurrentState({ evtType, stateKey }); } +const QVector<const StateEventBase*> +Room::stateEventsOfType(const QString& evtType) const +{ + return d->stateEventsOfType(evtType); +} + +const QHash<StateEventKey, const StateEventBase*>& Room::currentState() const +{ + return d->currentState; +} + RoomEventPtr Room::decryptMessage(const EncryptedEvent& encryptedEvent) { #ifndef Quotient_E2EE_ENABLED |