From 39ce616d0d0273d5b59ac7a3baa434f342cd54ed Mon Sep 17 00:00:00 2001 From: Xyphyn Date: Thu, 13 Jul 2023 12:48:36 -0700 Subject: [PATCH] fix: Fix inbox --- src/lib/lemmy.ts | 2 +- src/routes/inbox/InboxItem.svelte | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/lemmy.ts b/src/lib/lemmy.ts index aa6356df..c1aa0d27 100644 --- a/src/lib/lemmy.ts +++ b/src/lib/lemmy.ts @@ -78,7 +78,7 @@ authData.subscribe(async (data) => { auth: data.token, }) - if (!site.my_user) throw Error('Missing user') + if (!site?.my_user) throw Error('Missing user') user.set({ ...site.my_user.local_user_view, unreads: 0 }) diff --git a/src/routes/inbox/InboxItem.svelte b/src/routes/inbox/InboxItem.svelte index f9735878..6a470795 100644 --- a/src/routes/inbox/InboxItem.svelte +++ b/src/routes/inbox/InboxItem.svelte @@ -107,7 +107,7 @@ overflow-hidden flex flex-row items-center gap-1 {read ? 'opacity-80' : ''}" > - {#if messageItem.creator.id == $user?.person_view.person.id} + {#if messageItem.creator.id == $user?.person.id} You {:else} @@ -115,7 +115,7 @@ messaged - {#if messageItem.recipient.id == $user?.person_view.person.id} + {#if messageItem.recipient.id == $user?.person.id} You {:else} @@ -126,7 +126,7 @@

- {#if messageItem.recipient.id == $user?.person_view.person.id} + {#if messageItem.recipient.id == $user?.person.id}