summaryrefslogtreecommitdiff
path: root/ui/routes/(app)/c
diff options
context:
space:
mode:
Diffstat (limited to 'ui/routes/(app)/c')
-rw-r--r--ui/routes/(app)/c/[conversation]/+page.svelte8
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/routes/(app)/c/[conversation]/+page.svelte b/ui/routes/(app)/c/[conversation]/+page.svelte
index 24baa47..5a832ee 100644
--- a/ui/routes/(app)/c/[conversation]/+page.svelte
+++ b/ui/routes/(app)/c/[conversation]/+page.svelte
@@ -56,6 +56,14 @@
if (!!at) {
session.local.updateLastReadAt(conversationId, at);
}
+
+ navigator.serviceWorker.ready.then((registration) => {
+ registration.active.postMessage({
+ type: 'CONVERSATION_READ',
+ conversationId,
+ at,
+ });
+ });
}
$effect(() => {