From 5a5a7251b1bc6f39af17cd00dea2eb6bddd72e1c Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sat, 2 Jun 2018 16:45:39 +0900 Subject: csapi: Fix adding omittables to a query string --- lib/csapi/list_public_rooms.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/csapi/list_public_rooms.cpp') 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 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()) -- cgit v1.2.3