From 3119ef0f004b576d67737bebf517947f8819b4fa Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Tue, 22 Jul 2025 18:54:44 -0400 Subject: Render message markdown to HTML inside of ``. This simplifies data flow, at the potential expense of re-rendering HTML more often than strictly necessary. Requiring every path that produces a message-shaped object to pre-render markdown made things more interdependent than intended and slowed me down. --- ui/lib/session.svelte.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'ui/lib/session.svelte.js') diff --git a/ui/lib/session.svelte.js b/ui/lib/session.svelte.js index 4430e8a..42b86f0 100644 --- a/ui/lib/session.svelte.js +++ b/ui/lib/session.svelte.js @@ -29,24 +29,22 @@ class Conversation { } class Message { - static fromRemote({ id, at, conversation, sender, body, renderedBody }, users) { + static fromRemote({ id, at, conversation, sender, body }, users) { return new Message({ id, at, conversation, sender: users.get(sender), body, - renderedBody, }); } - constructor({ id, at, conversation, sender, body, renderedBody }) { + constructor({ id, at, conversation, sender, body }) { this.id = id; this.at = at; this.conversation = conversation; this.sender = sender; this.body = body; - this.renderedBody = renderedBody; } } -- cgit v1.2.3