Skip to content

Commit

Permalink
csapi/profile.cpp: fix setting empty name/avatar
Browse files Browse the repository at this point in the history
This is a temporary workaround for
matrix-org/synapse#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).
  • Loading branch information
KitsuneRal committed Aug 23, 2020
1 parent bc105c2 commit c306470
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/csapi/profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand All @@ -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));
}

Expand Down

0 comments on commit c306470

Please sign in to comment.