From c910c6e1f361cfe83e7110e03f834d270aa77997 Mon Sep 17 00:00:00 2001 From: Alejo Thomas Ortega Date: Fri, 26 Jan 2024 15:35:45 -0300 Subject: [PATCH] fix: message handling --- consumer-server/src/logic/message-handler.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/consumer-server/src/logic/message-handler.ts b/consumer-server/src/logic/message-handler.ts index 75385a89..3c2beea6 100644 --- a/consumer-server/src/logic/message-handler.ts +++ b/consumer-server/src/logic/message-handler.ts @@ -9,11 +9,13 @@ export function createMessageHandlerComponent({ async function handle(message: { Message: string }): Promise { const parsedMessage = JSON.parse(message.Message) - if (parsedMessage.entityType !== 'scene') { + logger.info('Handling message', { parsedMessage }) + if (parsedMessage.entity.entityType !== 'scene') { return } - const { base, entityId } = parsedMessage + const entityId = parsedMessage.entity.entityId + const base = parsedMessage.entity.metadata.scene.base try { const result = await lodGenerator.generate(entityId, base)