make hardcoded "cadence.moe" configurable

This commit is contained in:
Cadence Ember 2023-08-23 12:45:19 +12:00
commit 458a620f4a
5 changed files with 10 additions and 7 deletions

View file

@ -21,7 +21,7 @@ async function createSim(user) {
// Choose sim name
const simName = userToMxid.userToSimName(user)
const localpart = reg.ooye.namespace_prefix + simName
const mxid = "@" + localpart + ":cadence.moe"
const mxid = `@${localpart}:${reg.ooye.server_name}`
// Save chosen name in the database forever
// Making this database change right away so that in a concurrent registration, the 2nd registration will already have generated a different localpart because it can see this row when it generates