From 0e14a3b7e365c05992848cfbc4b8d7d9681d6d04 Mon Sep 17 00:00:00 2001
From: Owen Jacobson <owen@grimoire.ca>
Date: Sat, 2 Nov 2024 16:39:11 -0400
Subject: Ensure that the message HTML is re-rendered when the message markdown
 changes.

This was causing messages to persist when switching channels, due to the work minimization performed by Svelte.
---
 ui/lib/components/Message.svelte | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'ui/lib/components/Message.svelte')

diff --git a/ui/lib/components/Message.svelte b/ui/lib/components/Message.svelte
index dd06eca..b71cf3c 100644
--- a/ui/lib/components/Message.svelte
+++ b/ui/lib/components/Message.svelte
@@ -5,7 +5,7 @@
     export let at;
     export let body;
 
-    let renderedBody = DOMPurify.sanitize(marked.parse(body));
+    $: renderedBody = DOMPurify.sanitize(marked.parse(body));
 
     let scroll = (message) => {
         message.scrollIntoView();
-- 
cgit v1.2.3

