0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 07:23:53 +01:00

ircd:Ⓜ️:push::request: Add conf item to toggle functionality.

This commit is contained in:
Jason Volk 2020-10-25 00:30:00 -07:00
parent 891cba3fb9
commit cc8c9942a4
3 changed files with 12 additions and 0 deletions

View file

@ -38,6 +38,7 @@ namespace ircd::m::push
struct ircd::m::push::request
:instance_list<ircd::m::push::request>
{
static conf::item<bool> enable;
static conf::item<seconds> timeout;
static ctx::mutex mutex;
static ctx::dock dock;

View file

@ -42,6 +42,13 @@ ircd::util::instance_list<ircd::m::push::request>::list
allocator
};
decltype(ircd::m::push::request::enable)
ircd::m::push::request::enable
{
{ "name", "ircd.m.push.request.enable" },
{ "default", true },
};
decltype(ircd::m::push::request::timeout)
ircd::m::push::request::timeout
{

View file

@ -185,6 +185,10 @@ ircd::m::push::handle_event(const m::event &event,
vm::eval &eval)
try
{
// Pushing disabled by configuration
if(!request::enable)
return;
// All pusher notifications are generated from internal rooms only
if(!eval.room_internal)
return;