configuration option to auto-invite matrix users

This commit is contained in:
Cadence Ember 2023-09-12 23:08:33 +12:00
parent 47b8d44010
commit 9263bdb754
4 changed files with 7 additions and 1 deletions

View file

@ -6,7 +6,9 @@ const yaml = require("js-yaml")
/** @ts-ignore @type {import("../types").AppServiceRegistrationConfig} */
const reg = yaml.load(fs.readFileSync("registration.yaml", "utf8"))
reg["ooye"].invite = (reg.ooye.invite || []).filter(mxid => mxid.endsWith(`:${reg.ooye.server_name}`)) // one day I will understand why typescript disagrees with dot notation on this line
assert(reg.ooye.max_file_size)
assert(reg.ooye.namespace_prefix)
assert(reg.ooye.server_name)
module.exports = reg