diff --git a/src/libneochat/neochatconnection.cpp b/src/libneochat/neochatconnection.cpp index c087493ca..62276df1f 100644 --- a/src/libneochat/neochatconnection.cpp +++ b/src/libneochat/neochatconnection.cpp @@ -608,4 +608,9 @@ void NeoChatConnection::reportUser(const QString &userId, const QString &reason) callApi(userId, reason); } +bool NeoChatConnection::supportsMatrixSpecVersion(const QString &version) +{ + return supportedMatrixSpecVersions().contains(version); +} + #include "moc_neochatconnection.cpp" diff --git a/src/libneochat/neochatconnection.h b/src/libneochat/neochatconnection.h index 503dfb572..7270aafb6 100644 --- a/src/libneochat/neochatconnection.h +++ b/src/libneochat/neochatconnection.h @@ -229,6 +229,11 @@ public: */ Q_INVOKABLE void reportUser(const QString &userId, const QString &reason); + /** + * @return True if this connection supports the given spec version (e.g. "v1.11"). + */ + Q_INVOKABLE bool supportsMatrixSpecVersion(const QString &version); + Q_SIGNALS: void globalUrlPreviewEnabledChanged(); void labelChanged();