diff --git a/apps/shinkai-visor/src/components/inboxes/inboxes.tsx b/apps/shinkai-visor/src/components/inboxes/inboxes.tsx index 23e8e15df..6a2aed180 100644 --- a/apps/shinkai-visor/src/components/inboxes/inboxes.tsx +++ b/apps/shinkai-visor/src/components/inboxes/inboxes.tsx @@ -66,7 +66,7 @@ export const Inboxes = () => { const navigateToInbox = (inbox: { inbox_id: string; custom_name: string; - last_message: ShinkaiMessage; + last_message?: ShinkaiMessage; }) => { history.push(`/inboxes/${encodeURIComponent(inbox.inbox_id)}`, { inbox }); }; @@ -136,8 +136,8 @@ export const Inboxes = () => { - - {inbox.last_message.external_metadata + + {inbox.last_message?.external_metadata ?.scheduled_time && formatDateToMonthAndDay( new Date( diff --git a/libs/shinkai-message-ts/src/models/ShinkaiMessage.ts b/libs/shinkai-message-ts/src/models/ShinkaiMessage.ts index e329b3fc5..4fdcfe985 100644 --- a/libs/shinkai-message-ts/src/models/ShinkaiMessage.ts +++ b/libs/shinkai-message-ts/src/models/ShinkaiMessage.ts @@ -54,5 +54,5 @@ export interface RegistrationCode { export type SmartInbox = { custom_name: string; inbox_id: string; - last_message: ShinkaiMessage; + last_message?: ShinkaiMessage; }; \ No newline at end of file