diff options
author | Carl Schwan <carl@carlschwan.eu> | 2021-02-26 15:00:55 +0100 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2021-02-26 15:00:55 +0100 |
commit | f5862e8b6fccb85f7080ccddcdea436540588b36 (patch) | |
tree | 611e3518cff4828432084c4ca9f4150ec7cf1bbe /lib/connection.cpp | |
parent | 382b08fc5ad9f22dacb2e6504869c42062565e7c (diff) | |
download | libquotient-f5862e8b6fccb85f7080ccddcdea436540588b36.tar.gz libquotient-f5862e8b6fccb85f7080ccddcdea436540588b36.zip |
Add public method to determine if we can change the user password
Diffstat (limited to 'lib/connection.cpp')
-rw-r--r-- | lib/connection.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp index d773f0d8..91de2e4e 100644 --- a/lib/connection.cpp +++ b/lib/connection.cpp @@ -1745,6 +1745,15 @@ QStringList Connection::stableRoomVersions() const return l; } +bool Connection::canChangePassword() const +{ + if (!d->capabilities.changePassword) { + // assume we can + return true; + } + return d->capabilities.changePassword->enabled; +} + inline bool roomVersionLess(const Connection::SupportedRoomVersion& v1, const Connection::SupportedRoomVersion& v2) { |