diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2025-07-22 18:54:44 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2025-08-19 15:08:39 -0400 |
| commit | 3119ef0f004b576d67737bebf517947f8819b4fa (patch) | |
| tree | 0999dedeea07d527255613bec8bd84e34e0501ed /ui/lib/session.svelte.js | |
| parent | 4ace27830ffea715c30f366765aeb231572c60ec (diff) | |
Render message markdown to HTML inside of `<Message />`.
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.
Diffstat (limited to 'ui/lib/session.svelte.js')
| -rw-r--r-- | ui/lib/session.svelte.js | 6 |
1 files changed, 2 insertions, 4 deletions
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; } } |
