diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-09-04 22:45:04 +0200 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-09-04 22:45:16 +0200 |
commit | c641e3f070d6687e10a2cdb9fe3e4f7d12c5704f (patch) | |
tree | bf027549e8848c0fdf14acd5a553293135830e24 | |
parent | d7820ada21fb29b273a68a5ea69477ef5763d5de (diff) | |
download | libquotient-c641e3f070d6687e10a2cdb9fe3e4f7d12c5704f.tar.gz libquotient-c641e3f070d6687e10a2cdb9fe3e4f7d12c5704f.zip |
csapi/profile.*: require displayname/avatar_url
See https://github.com/matrix-org/matrix-doc/issues/2717
-rw-r--r-- | lib/csapi/profile.cpp | 4 | ||||
-rw-r--r-- | lib/csapi/profile.h | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/lib/csapi/profile.cpp b/lib/csapi/profile.cpp index cb8f72be..8436b8e6 100644 --- a/lib/csapi/profile.cpp +++ b/lib/csapi/profile.cpp @@ -15,7 +15,7 @@ SetDisplayNameJob::SetDisplayNameJob(const QString& userId, % "/displayname") { QJsonObject _data; - addParam<IfNotEmpty>(_data, QStringLiteral("displayname"), displayname); + addParam<>(_data, QStringLiteral("displayname"), displayname); setRequestData(std::move(_data)); } @@ -39,7 +39,7 @@ SetAvatarUrlJob::SetAvatarUrlJob(const QString& userId, const QString& avatarUrl % "/avatar_url") { QJsonObject _data; - addParam<IfNotEmpty>(_data, QStringLiteral("avatar_url"), avatarUrl); + addParam<>(_data, QStringLiteral("avatar_url"), avatarUrl); setRequestData(std::move(_data)); } diff --git a/lib/csapi/profile.h b/lib/csapi/profile.h index 88bf3166..3858fab2 100644 --- a/lib/csapi/profile.h +++ b/lib/csapi/profile.h @@ -24,7 +24,7 @@ public: * The new display name for this user. */ explicit SetDisplayNameJob(const QString& userId, - const QString& displayname = {}); + const QString& displayname); }; /*! \brief Get the user's display name. @@ -73,8 +73,7 @@ public: * \param avatarUrl * The new avatar URL for this user. */ - explicit SetAvatarUrlJob(const QString& userId, - const QString& avatarUrl = {}); + explicit SetAvatarUrlJob(const QString& userId, const QString& avatarUrl); }; /*! \brief Get the user's avatar URL. |