diff --git a/README.md b/README.md index bed751ac4e..abd3ed66fb 100644 --- a/README.md +++ b/README.md @@ -188,6 +188,7 @@ DATABASE_URL="postgresql://postgres:your_password@localhost:5432/simstudio" Then run the migrations: ```bash +cd packages/db # Required so drizzle picks correct .env file bunx drizzle-kit migrate --config=./drizzle.config.ts ``` diff --git a/apps/sim/app/(landing)/components/footer/footer.tsx b/apps/sim/app/(landing)/components/footer/footer.tsx index cb13cbd3f6..412f3040b5 100644 --- a/apps/sim/app/(landing)/components/footer/footer.tsx +++ b/apps/sim/app/(landing)/components/footer/footer.tsx @@ -109,7 +109,7 @@ export default function Footer({ fullWidth = false }: FooterProps) { {FOOTER_BLOCKS.map((block) => ( { - const notification = body.value[0] + const notification = body.value?.[0] + if (!notification) { + logger.warn('Received empty Teams notification body') + return null + } const changeType = notification.changeType || 'created' const resource = notification.resource || '' const subscriptionId = notification.subscriptionId || '' @@ -359,7 +363,7 @@ async function formatTeamsGraphNotification( contentType: mimeType, size, }) - } catch {} + } catch { } } } } @@ -634,24 +638,24 @@ export async function formatWebhookInput( const senderObj = message.from ? { - id: message.from.id, - firstName: message.from.first_name, - lastName: message.from.last_name, - username: message.from.username, - languageCode: message.from.language_code, - isBot: message.from.is_bot, - } + id: message.from.id, + firstName: message.from.first_name, + lastName: message.from.last_name, + username: message.from.username, + languageCode: message.from.language_code, + isBot: message.from.is_bot, + } : null const chatObj = message.chat ? { - id: message.chat.id, - type: message.chat.type, - title: message.chat.title, - username: message.chat.username, - firstName: message.chat.first_name, - lastName: message.chat.last_name, - } + id: message.chat.id, + type: message.chat.type, + title: message.chat.title, + username: message.chat.username, + firstName: message.chat.first_name, + lastName: message.chat.last_name, + } : null return {