make hardcoded "cadence.moe" configurable

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

View file

@ -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, {