0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 08:12:37 +01:00

modules/client/publicrooms: Refresh the cache on request.

fixes #82
This commit is contained in:
Jason Volk 2019-06-17 23:06:28 -07:00
parent 75c125e8aa
commit f2fb177d7d

View file

@ -92,6 +92,20 @@ get__publicrooms(client &client,
request.get<bool>("include_all_networks", false)
};
if(server && !my_host(server)) try
{
m::rooms::fetch_update(server, since, limit);
}
catch(const std::exception &e)
{
log::error
{
m::log, "Failed to fetch public rooms from '%s' :%s",
server,
e.what()
};
}
resource::response::chunked response
{
client, http::OK