mirror of
https://github.com/matrix-construct/construct
synced 2025-01-13 08:23:56 +01:00
modules/federation/query: Add my_host() in response for now.
This commit is contained in:
parent
a380186001
commit
ed87eb31e0
1 changed files with 8 additions and 3 deletions
|
@ -124,14 +124,19 @@ get__query_directory(client &client,
|
|||
};
|
||||
|
||||
//TODO: servers
|
||||
const std::array<json::value, 1> server
|
||||
const std::array<json::value, 2> server
|
||||
{
|
||||
{ room_alias.host() }
|
||||
{ room_alias.host(), my_host() }
|
||||
};
|
||||
|
||||
const size_t server_count
|
||||
{
|
||||
server.size() - bool(room_alias.host() == my_host())
|
||||
};
|
||||
|
||||
const json::value servers
|
||||
{
|
||||
server.data(), server.size()
|
||||
server.data(), server_count
|
||||
};
|
||||
|
||||
return resource::response
|
||||
|
|
Loading…
Reference in a new issue