diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-06-02 16:45:39 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-06-02 16:45:39 +0900 |
commit | 5a5a7251b1bc6f39af17cd00dea2eb6bddd72e1c (patch) | |
tree | 8ba6faea582b9f4e0cb2c4c4ea8379b1a8084ca7 /lib/csapi/list_public_rooms.cpp | |
parent | 239c33243b21f120f581a646b298950bb18489ee (diff) | |
download | libquotient-5a5a7251b1bc6f39af17cd00dea2eb6bddd72e1c.tar.gz libquotient-5a5a7251b1bc6f39af17cd00dea2eb6bddd72e1c.zip |
csapi: Fix adding omittables to a query string
Diffstat (limited to 'lib/csapi/list_public_rooms.cpp')
-rw-r--r-- | lib/csapi/list_public_rooms.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/csapi/list_public_rooms.cpp b/lib/csapi/list_public_rooms.cpp index 97beba1c..f104786b 100644 --- a/lib/csapi/list_public_rooms.cpp +++ b/lib/csapi/list_public_rooms.cpp @@ -100,7 +100,8 @@ class GetPublicRoomsJob::Private BaseJob::Query queryToGetPublicRooms(Omittable<int> limit, const QString& since, const QString& server) { BaseJob::Query _q; - _q.addQueryItem("limit", QString("%1").arg(limit)); + if (limit) + _q.addQueryItem("limit", QString("%1").arg(limit.value())); if (!since.isEmpty()) _q.addQueryItem("since", since); if (!server.isEmpty()) |