Moderation Bot integration WIP:

* Start and stop the bot WIP
* Prosody: removing the BOSH module from the global scope (must only be present on relevant virtualhosts)
* Some refactoring
This commit is contained in:
John Livingston
2023-09-18 18:53:07 +02:00
parent 65fd49a81c
commit f97e54d499
15 changed files with 348 additions and 26 deletions

View File

@ -10,9 +10,9 @@ import type { RequestPromiseHandler } from '../async'
function checkConfigurationEnabledMiddleware (options: RegisterServerOptions): RequestPromiseHandler {
return async (req: Request, res: Response, next: NextFunction) => {
const settings = await options.settingsManager.getSettings([
'disable-configuration'
'disable-channel-configuration'
])
if (!settings['disable-configuration']) {
if (!settings['disable-channel-configuration']) {
next()
return
}