0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-26 08:42:34 +01:00

modules/client/rooms/report: Create !abuse room with !ircd init hook.

This commit is contained in:
Jason Volk 2019-03-16 19:38:33 -07:00
parent 4e618175c7
commit 2158d3e7b6

View file

@ -12,6 +12,8 @@
using namespace ircd;
static void create_report_room(const m::event &, m::vm::eval &);
const m::room::id::buf
report_room_id
{
@ -25,6 +27,17 @@ reason_max
{ "default", 512L }
};
const m::hookfn<m::vm::eval &>
create_report_room_hook
{
create_report_room,
{
{ "_site", "vm.effect" },
{ "room_id", "!ircd" },
{ "type", "m.room.create" },
}
};
resource::response
post__report(client &client,
const resource::request &request,
@ -90,13 +103,9 @@ post__report(client &client,
};
}
struct create_report_room
{
create_report_room();
}
static create_report_room;
create_report_room::create_report_room()
void
create_report_room(const m::event &,
m::vm::eval &)
try
{
if(m::exists(report_room_id))