do not require rule server config to be present. (#208)

This commit is contained in:
Gnuxie 2022-02-01 13:20:26 +00:00 committed by GitHub
parent 767e1a5a7e
commit 8a9ded80c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -76,7 +76,7 @@ interface IConfig {
abuseReporting: {
enabled: boolean;
}
ruleServer: {
ruleServer?: {
enabled: boolean;
}
}

View File

@ -62,7 +62,7 @@ export class WebAPIs {
// Configure ruleServer API.
// FIXME: Doesn't this need some kind of access control?
// See https://github.com/matrix-org/mjolnir/issues/139#issuecomment-1012221479.
if (config.web.ruleServer.enabled) {
if (config.web.ruleServer?.enabled) {
const updatesUrl = `${API_PREFIX}/ruleserver/updates`;
LogService.info("WebAPIs", `Configuring ${updatesUrl}...`);
if (!this.ruleServer) {