diff options
author | Carl Schwan <carl@carlschwan.eu> | 2021-02-26 18:04:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-26 18:04:14 +0100 |
commit | 1335534aa71519ce55bee226ac67c1b0188f4b4b (patch) | |
tree | 2870a97b4d31a3b0af3f6711cb0efe1a1fc74055 /lib/connection.cpp | |
parent | f5862e8b6fccb85f7080ccddcdea436540588b36 (diff) | |
download | libquotient-1335534aa71519ce55bee226ac67c1b0188f4b4b.tar.gz libquotient-1335534aa71519ce55bee226ac67c1b0188f4b4b.zip |
Apply suggestion
Co-authored-by: Alexey Rusakov <Kitsune-Ral@users.sf.net>
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, |