diff --git a/d2m/actions/create-space.js b/d2m/actions/create-space.js index 838bef9..87e25eb 100644 --- a/d2m/actions/create-space.js +++ b/d2m/actions/create-space.js @@ -97,7 +97,7 @@ async function syncSpace(guildID) { const roomsWithCustomAvatars = db.prepare("SELECT room_id FROM channel_room WHERE custom_avatar IS NOT NULL").pluck().all() const childRooms = ks.kstateToState(spaceKState).filter(({type, state_key, content}) => { - return type === "m.space.child" && "via" in content && roomsWithCustomAvatars.includes(state_key) + return type === "m.space.child" && "via" in content && !roomsWithCustomAvatars.includes(state_key) }).map(({state_key}) => state_key) for (const roomID of childRooms) { @@ -108,7 +108,6 @@ async function syncSpace(guildID) { } } - return spaceID }