diff options
Diffstat (limited to 'lib/connection.cpp')
-rw-r--r-- | lib/connection.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp index 91de2e4e..579c7920 100644 --- a/lib/connection.cpp +++ b/lib/connection.cpp @@ -1747,11 +1747,10 @@ QStringList Connection::stableRoomVersions() const bool Connection::canChangePassword() const { - if (!d->capabilities.changePassword) { - // assume we can - return true; - } - return d->capabilities.changePassword->enabled; + // By default assume we can + return d->capabilities.changePassword + ? d->capabilities.changePassword->enabled + : true; } inline bool roomVersionLess(const Connection::SupportedRoomVersion& v1, |