Skip to content

Commit

Permalink
allow displayname instead of display-name
Browse files Browse the repository at this point in the history
Seen in owncloud/product#181 (comment)
Please check which one is correct.
  • Loading branch information
jnweiger authored and TheOneRing committed Sep 8, 2020
1 parent c396a2e commit 2461530
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gui/connectionvalidator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ void ConnectionValidator::slotUserFetched(const QJsonDocument &json)
_account->setDavUser(user);
}
QString displayName = json.object().value("ocs").toObject().value("data").toObject().value("display-name").toString();
if ( displayName.isEmpty()) {
displayName = json.object().value("ocs").toObject().value("data").toObject().value("displayname").toString();
}
if (!displayName.isEmpty()) {
_account->setDavDisplayName(displayName);
}
Expand Down

0 comments on commit 2461530

Please sign in to comment.