From b8439d61a976564ec30c4a02768d193e607dc80d Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Fri, 4 Oct 2019 20:23:59 -0700 Subject: [PATCH] modules/client: Fix errant non-m:: resources. --- modules/client/directory/user.cc | 10 ++--- modules/client/user/account_data.cc | 10 ++--- modules/client/user/rooms.cc | 62 ++++++++++++++--------------- modules/client/voip/turnserver.cc | 14 +++---- 4 files changed, 48 insertions(+), 48 deletions(-) diff --git a/modules/client/directory/user.cc b/modules/client/directory/user.cc index 6a83bae59..9f2667bf4 100644 --- a/modules/client/directory/user.cc +++ b/modules/client/directory/user.cc @@ -16,7 +16,7 @@ IRCD_MODULE "Client 8.1 :User Directory" }; -resource +m::resource search_resource { "/_matrix/client/r0/user_directory/search", @@ -25,9 +25,9 @@ search_resource } }; -resource::response +m::resource::response post__search(client &client, - const resource::request &request) + const m::resource::request &request) { const json::string &search_term { @@ -115,7 +115,7 @@ post__search(client &client, }; top.~object(); - return resource::response + return m::resource::response { client, json::object { @@ -124,7 +124,7 @@ post__search(client &client, }; } -resource::method +m::resource::method search_post { search_resource, "POST", post__search, diff --git a/modules/client/user/account_data.cc b/modules/client/user/account_data.cc index c7a8b60be..e26c0b769 100644 --- a/modules/client/user/account_data.cc +++ b/modules/client/user/account_data.cc @@ -12,9 +12,9 @@ using namespace ircd; -resource::response +m::resource::response put__account_data(client &client, - const resource::request &request, + const m::resource::request &request, const m::user &user) { if(request.parv.size() < 3) @@ -39,15 +39,15 @@ put__account_data(client &client, m::user::account_data{user}.set(type, value) }; - return resource::response + return m::resource::response { client, http::OK }; } -resource::response +m::resource::response get__account_data(client &client, - const resource::request &request, + const m::resource::request &request, const m::user &user) { if(request.parv.size() < 3) diff --git a/modules/client/user/rooms.cc b/modules/client/user/rooms.cc index 59d99cf49..7d454f585 100644 --- a/modules/client/user/rooms.cc +++ b/modules/client/user/rooms.cc @@ -12,39 +12,39 @@ using namespace ircd; -static resource::response +static m::resource::response put__tags(client &client, - const resource::request &request, + const m::resource::request &request, const m::user &user, const m::room &room_id); -static resource::response +static m::resource::response get__tags(client &client, - const resource::request &request, + const m::resource::request &request, const m::user &user, const m::room &room); -static resource::response +static m::resource::response delete__tags(client &client, - const resource::request &request, + const m::resource::request &request, const m::user &user, const m::room &room); -static resource::response +static m::resource::response put__account_data(client &client, - const resource::request &request, + const m::resource::request &request, const m::user &user, const m::room &room_id); -static resource::response +static m::resource::response get__account_data(client &client, - const resource::request &request, + const m::resource::request &request, const m::user &user, const m::room &room); -resource::response +m::resource::response put__rooms(client &client, - const resource::request &request, + const m::resource::request &request, const m::user::id &user_id) { if(request.parv.size() < 3) @@ -81,9 +81,9 @@ put__rooms(client &client, }; } -resource::response +m::resource::response get__rooms(client &client, - const resource::request &request, + const m::resource::request &request, const m::user::id &user_id) { if(request.parv.size() < 3) @@ -120,9 +120,9 @@ get__rooms(client &client, }; } -resource::response +m::resource::response delete__rooms(client &client, - const resource::request &request, + const m::resource::request &request, const m::user::id &user_id) { if(request.parv.size() < 3) @@ -156,9 +156,9 @@ delete__rooms(client &client, }; } -resource::response +m::resource::response put__tags(client &client, - const resource::request &request, + const m::resource::request &request, const m::user &user, const m::room &room) { @@ -186,15 +186,15 @@ put__tags(client &client, room_tags.set(tag, value); - return resource::response + return m::resource::response { client, http::OK }; } -resource::response +m::resource::response get__tags(client &client, - const resource::request &request, + const m::resource::request &request, const m::user &user, const m::room &room) { @@ -203,7 +203,7 @@ get__tags(client &client, user, room }; - resource::response::chunked response + m::resource::response::chunked response { client, http::OK }; @@ -233,9 +233,9 @@ get__tags(client &client, return std::move(response); } -resource::response +m::resource::response delete__tags(client &client, - const resource::request &request, + const m::resource::request &request, const m::user &user, const m::room &room) { @@ -262,15 +262,15 @@ delete__tags(client &client, room_tags.del(tag) }; - return resource::response + return m::resource::response { client, deleted? http::OK : http::NOT_FOUND }; } -resource::response +m::resource::response put__account_data(client &client, - const resource::request &request, + const m::resource::request &request, const m::user &user, const m::room &room) { @@ -296,15 +296,15 @@ put__account_data(client &client, m::user::room_account_data{user, room}.set(type, value) }; - return resource::response + return m::resource::response { client, http::OK }; } -resource::response +m::resource::response get__account_data(client &client, - const resource::request &request, + const m::resource::request &request, const m::user &user, const m::room &room) { @@ -324,7 +324,7 @@ get__account_data(client &client, m::user::room_account_data{user, room}.get(type, [&client] (const string_view &type, const json::object &value) { - resource::response + m::resource::response { client, value }; diff --git a/modules/client/voip/turnserver.cc b/modules/client/voip/turnserver.cc index e370c578b..a2dc8e437 100644 --- a/modules/client/voip/turnserver.cc +++ b/modules/client/voip/turnserver.cc @@ -16,7 +16,7 @@ IRCD_MODULE "Client 11.3 :Voice over IP" }; -resource +m::resource turnserver_resource { "/_matrix/client/r0/voip/turnServer", @@ -26,11 +26,11 @@ turnserver_resource } }; -static resource::response +static m::resource::response get__turnserver(client &client, - const resource::request &request); + const m::resource::request &request); -resource::method +m::resource::method turnserver_get { turnserver_resource, "GET", get__turnserver, @@ -70,11 +70,11 @@ turnserver_uris { "default", json::empty_array }, }; -resource::response +m::resource::response get__turnserver(client &client, - const resource::request &request) + const m::resource::request &request) { - return resource::response + return m::resource::response { client, json::members {