mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 18:22:50 +01:00
modules/client/publicrooms: Checkpoint empty responses.
This commit is contained in:
parent
d90f369c6d
commit
87aece1dd7
1 changed files with 24 additions and 2 deletions
|
@ -40,9 +40,20 @@ resource::response
|
|||
get__publicrooms(client &client,
|
||||
const resource::request &request)
|
||||
{
|
||||
std::vector<json::value> chunk;
|
||||
const string_view next_batch;
|
||||
const string_view prev_batch;
|
||||
const int64_t total_room_count_estimate{0};
|
||||
|
||||
return resource::response
|
||||
{
|
||||
client, http::OK
|
||||
client, json::members
|
||||
{
|
||||
{ "chunk", { chunk.data(), chunk.size() } },
|
||||
{ "next_batch", next_batch },
|
||||
{ "prev_batch", prev_batch },
|
||||
{ "total_room_count_estimate", total_room_count_estimate },
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -50,9 +61,20 @@ resource::response
|
|||
post__publicrooms(client &client,
|
||||
const resource::request &request)
|
||||
{
|
||||
std::vector<json::value> chunk;
|
||||
const string_view next_batch;
|
||||
const string_view prev_batch;
|
||||
const int64_t total_room_count_estimate{0};
|
||||
|
||||
return resource::response
|
||||
{
|
||||
client, http::OK
|
||||
client, json::members
|
||||
{
|
||||
{ "chunk", { chunk.data(), chunk.size() } },
|
||||
{ "next_batch", next_batch },
|
||||
{ "prev_batch", prev_batch },
|
||||
{ "total_room_count_estimate", total_room_count_estimate },
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue