aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2020-08-23 16:14:07 +0200
committerKitsune Ral <Kitsune-Ral@users.sf.net>2020-08-23 16:14:07 +0200
commitc306470f21b888e0195f473c5030be40ffcdb5fc (patch)
tree8afbfc415bd4bce3ecbb147354e33f24273ac4fd /lib/csapi
parentbc105c2fef5334d0654071f72e248a0892a9b20b (diff)
downloadlibquotient-c306470f21b888e0195f473c5030be40ffcdb5fc.tar.gz
libquotient-c306470f21b888e0195f473c5030be40ffcdb5fc.zip
csapi/profile.cpp: fix setting empty name/avatar
This is a temporary workaround for https://github.com/matrix-org/synapse/issues/8029 - note that regenerating CS API code will lead to overwriting this. The proper fix should be done in matrix-doc (see https://github.com/matrix-org/matrix-doc/issues/2717).
Diffstat (limited to 'lib/csapi')
-rw-r--r--lib/csapi/profile.cpp4
1 files changed, 2 insertions, 2 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));
}