diff --git a/src/scenes.js b/src/scenes.js index 811d47a..2fa3a6c 100644 --- a/src/scenes.js +++ b/src/scenes.js @@ -967,6 +967,13 @@ export async function createSceneRevision(sceneId, { edits, comment, apply }, re return [key, values.id]; } + if (key === 'tags') { + return [key, values.map((tag) => ({ + id: tag.id, + actorId: tag.actorId, + }))]; + } + if (Array.isArray(values)) { return [key, values.map((value) => value?.hash || value?.id || value)]; } @@ -983,6 +990,16 @@ export async function createSceneRevision(sceneId, { edits, comment, apply }, re return null; } + if (key === 'tags') { + return { + key, + value: value.map((tag) => ({ + id: tag.id, + actorId: tag.actorId, + })), + }; + } + if (Array.isArray(value)) { const valueSet = new Set(value); const baseSet = new Set(baseScene[key]);