make hardcoded "cadence.moe" configurable
This commit is contained in:
parent
92cd628a6c
commit
458a620f4a
5 changed files with 10 additions and 7 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
const assert = require("assert").strict
|
||||
const DiscordTypes = require("discord-api-types/v10")
|
||||
const reg = require("../../matrix/read-registration")
|
||||
|
||||
const passthrough = require("../../passthrough")
|
||||
const { discord, sync, db } = passthrough
|
||||
|
@ -85,7 +86,7 @@ async function channelToKState(channel, guild) {
|
|||
"m.room.guest_access/": {guest_access: "can_join"},
|
||||
"m.room.history_visibility/": {history_visibility},
|
||||
[`m.space.parent/${spaceID}`]: {
|
||||
via: ["cadence.moe"], // TODO: put the proper server here
|
||||
via: [reg.ooye.server_name],
|
||||
canonical: true
|
||||
},
|
||||
"m.room.join_rules/": {
|
||||
|
@ -252,7 +253,7 @@ async function _syncSpaceMember(channel, spaceID, roomID) {
|
|||
&& !channel["thread_metadata"]?.archived // archived threads do not belong in the space (don't offer people conversations that are no longer relevant)
|
||||
) {
|
||||
spaceEventContent = {
|
||||
via: ["cadence.moe"] // TODO: use the proper server
|
||||
via: [reg.ooye.server_name]
|
||||
}
|
||||
}
|
||||
const spaceDiff = ks.diffKState(spaceKState, {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue