mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 08:12:37 +01:00
ircd:Ⓜ️:vm: More granular notification broadcast options.
This commit is contained in:
parent
7bbcf63d8a
commit
88d3026cc7
3 changed files with 21 additions and 4 deletions
|
@ -120,8 +120,15 @@ struct ircd::m::vm::opts
|
|||
/// Apply effects of the eval
|
||||
bool effects {true};
|
||||
|
||||
/// Broadcast to clients/servers
|
||||
bool notify {true};
|
||||
/// Broadcast to clients/servers. When true, individual notify options
|
||||
/// that follow are considered. When false, no notifications occur.
|
||||
short notify {true};
|
||||
|
||||
/// Broadcast to local clients (/sync stream).
|
||||
bool notify_clients {true};
|
||||
|
||||
/// Broadcast to federation servers (/federation/send/).
|
||||
bool notify_servers {true};
|
||||
|
||||
/// False to allow a dirty conforms report (not recommended).
|
||||
bool conforming {true};
|
||||
|
|
|
@ -343,6 +343,10 @@ try
|
|||
m::vm::accept.wait_until(lock, args.timesout)
|
||||
};
|
||||
|
||||
assert(accepted.opts);
|
||||
if(!accepted.opts->notify_clients)
|
||||
continue;
|
||||
|
||||
if(synchronize(client, request, args, accepted))
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -70,8 +70,14 @@ send_worker()
|
|||
m::vm::accept.wait(lock)
|
||||
};
|
||||
|
||||
if(my(event))
|
||||
send(event);
|
||||
if(!my(event))
|
||||
continue;
|
||||
|
||||
assert(event.opts);
|
||||
if(!event.opts->notify_servers)
|
||||
continue;
|
||||
|
||||
send(event);
|
||||
}
|
||||
catch(const std::exception &e)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue