allow migrating from old to new bridge

This commit is contained in:
Cadence Ember
2023-09-04 01:38:30 +12:00
parent 5185ae45ab
commit 39458bd2bf
13 changed files with 214 additions and 42 deletions

View File

@@ -78,7 +78,10 @@ async function syncSpace(guildID) {
const guildKState = await guildToKState(guild)
if (!spaceID) return
if (!spaceID) {
const spaceID = await createSpace(guild, guildKState)
return spaceID // Naturally, the newly created space is already up to date, so we can always skip syncing here.
}
console.log(`[space sync] to matrix: ${guild.name}`)
@@ -123,7 +126,10 @@ async function syncSpaceFully(guildID) {
const guildKState = await guildToKState(guild)
if (!spaceID) return
if (!spaceID) {
const spaceID = await createSpace(guild, guildKState)
return spaceID // Naturally, the newly created space is already up to date, so we can always skip syncing here.
}
console.log(`[space sync] to matrix: ${guild.name}`)