mirror of
https://gitdab.com/cadence/out-of-your-element.git
synced 2025-09-12 05:02:58 +02:00
Adapt createRoom/space/invite to self-service
This commit is contained in:
parent
312ea69d73
commit
b0a0e62a86
6 changed files with 96 additions and 46 deletions
|
@ -92,6 +92,9 @@ async function _syncSpace(guild, shouldActuallySync) {
|
|||
const row = select("guild_space", ["space_id", "privacy_level"], {guild_id: guild.id}).get()
|
||||
|
||||
if (!row) {
|
||||
const autocreate = select("guild_active", "autocreate", {guild_id: guild.id}).pluck().get()
|
||||
assert.equal(autocreate, 1, `refusing to implicitly create guild ${guild.id}. set the guild_active data first before calling ensureSpace/syncSpace.`)
|
||||
|
||||
const creation = (async () => {
|
||||
const guildKState = await guildToKState(guild, createRoom.DEFAULT_PRIVACY_LEVEL) // New spaces will have to use the default privacy level; we obviously can't look up the existing entry
|
||||
const spaceID = await createSpace(guild, guildKState)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue