diff options
Diffstat (limited to 'lib/csapi/directory.cpp')
-rw-r--r-- | lib/csapi/directory.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/csapi/directory.cpp b/lib/csapi/directory.cpp index 3066ebe2..d5c5882f 100644 --- a/lib/csapi/directory.cpp +++ b/lib/csapi/directory.cpp @@ -17,8 +17,7 @@ SetRoomAliasJob::SetRoomAliasJob(const QString& roomAlias, const QString& roomId basePath % "/room/" % roomAlias) { QJsonObject _data; - if (!roomId.isEmpty()) - _data.insert("room_id", toJson(roomId)); + addToJson<IfNotEmpty>(_data, "room_id", roomId); setRequestData(_data); } |