diff --git a/src/matrix/read-registration.js b/src/matrix/read-registration.js index fec434f..9fb0535 100644 --- a/src/matrix/read-registration.js +++ b/src/matrix/read-registration.js @@ -29,6 +29,7 @@ function writeRegistration(reg) { * @returns {import("../types").InitialAppServiceRegistrationConfig} reg */ function getTemplateRegistration(serverName) { + const namespace_prefix = "_ooye_" return { id: "ooye", as_token: crypto.randomBytes(32).toString("hex"), @@ -36,21 +37,21 @@ function getTemplateRegistration(serverName) { namespaces: { users: [{ exclusive: true, - regex: `@_ooye_.*:${serverName}` + regex: `@${namespace_prefix}.*:${serverName}` }], aliases: [{ exclusive: true, - regex: `#_ooye_.*:${serverName}` + regex: `#${namespace_prefix}.*:${serverName}` }] }, protocols: [ "discord" ], - sender_localpart: "_ooye_bot", + sender_localpart: `${namespace_prefix}bot`, rate_limited: false, socket: 6693, ooye: { - namespace_prefix: "_ooye_", + namespace_prefix, max_file_size: 5000000, content_length_workaround: false, include_user_id_in_mxid: false,