From 5ab7dc642112d3b10fd4ee42650f6bd6e42cac21 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Tue, 23 Jan 2018 18:38:53 -0800 Subject: [PATCH] modules/client: filter_id is the event_id of the filter saved to the filter room... --- modules/client/user.cc | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/modules/client/user.cc b/modules/client/user.cc index 50f3d0a66..88545f929 100644 --- a/modules/client/user.cc +++ b/modules/client/user.cc @@ -145,19 +145,9 @@ post_filter(client &client, const resource::request::object &re const auto filter_id { - "abc123" + send(m::filter::filters, user_id, "ircd.filter"_sv, request.body) }; - json::iov event; - json::iov::push members[] - { - { event, json::member { "type", "ircd.filter" }}, - { event, json::member { "state_key", filter_id }}, - { event, json::member { "sender", user_id }}, - { event, json::member { "content", request.body }} - }; - - m::filter::filters.send(event); return resource::response { client, http::CREATED,