0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-07-24 11:28:37 +02:00
construct/modules/client/directory/room.cc

48 lines
1,002 B
C++

// Matrix Construct
//
// Copyright (C) Matrix Construct Developers, Authors & Contributors
// Copyright (C) 2016-2018 Jason Volk <jason@zemos.net>
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice is present in all copies. The
// full license for this software is available in the LICENSE file.
using namespace ircd;
mapi::header
IRCD_MODULE
{
"Client 7.2 :Room aliases"
};
resource
directory_room_resource
{
"/_matrix/client/r0/directory/room/",
{
"(7.2) Room aliases",
directory_room_resource.DIRECTORY
}
};
resource::response
get_directory_room(client &client, const resource::request &request)
{
m::room::alias::buf room_alias
{
url::decode(request.parv[0], room_alias)
};
return resource::response
{
client, http::NOT_FOUND
};
}
resource::method
directory_room_get
{
directory_room_resource, "GET", get_directory_room
};