mirror of
https://github.com/matrix-construct/construct
synced 2024-12-28 00:14:07 +01:00
modules/client: filter_id is the event_id of the filter saved to the filter room...
This commit is contained in:
parent
091657ec45
commit
5ab7dc6421
1 changed files with 1 additions and 11 deletions
|
@ -145,19 +145,9 @@ post_filter(client &client, const resource::request::object<const m::filter> &re
|
||||||
|
|
||||||
const auto filter_id
|
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
|
return resource::response
|
||||||
{
|
{
|
||||||
client, http::CREATED,
|
client, http::CREATED,
|
||||||
|
|
Loading…
Reference in a new issue