diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2025-07-01 14:24:36 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2025-07-03 22:43:43 -0400 |
| commit | 8d412732dc094ead3c5cf86c005d187f9624fc65 (patch) | |
| tree | 321f4ec443a8005c0bf3001c11e68eefe2bb4f48 /ui/lib/session.svelte.js | |
| parent | a15e3d580124f561864c6a39f1e035eb1b3aab13 (diff) | |
Replace `channel` with `conversation` throughout the API.
This is a **breaking change** for essentially all clients. Thankfully, there's presently just the one, so we don't need to go to much effort to accommoate that; the client is modified in this commit to adapt, users can reload their client, and life will go on.
Diffstat (limited to 'ui/lib/session.svelte.js')
| -rw-r--r-- | ui/lib/session.svelte.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ui/lib/session.svelte.js b/ui/lib/session.svelte.js index 838401c..0c73e00 100644 --- a/ui/lib/session.svelte.js +++ b/ui/lib/session.svelte.js @@ -11,7 +11,7 @@ import { DateTime } from 'luxon'; class Channel { static fromRemote({ at, id, name }, messages, meta) { const sentAt = messages - .filter((message) => message.channel === id) + .filter((message) => message.conversation === id) .map((message) => message.at); const lastEventAt = DateTime.max(at, ...sentAt); const lastReadAt = meta.get(id)?.lastReadAt; @@ -29,21 +29,21 @@ class Channel { } class Message { - static fromRemote({ id, at, channel, sender, body, renderedBody }, users) { + static fromRemote({ id, at, conversation, sender, body, renderedBody }, users) { return new Message({ id, at, - channel, + conversation, sender: users.get(sender), body, renderedBody, }); } - constructor({ id, at, channel, sender, body, renderedBody }) { + constructor({ id, at, conversation, sender, body, renderedBody }) { this.id = id; this.at = at; - this.channel = channel; + this.conversation = conversation; this.sender = sender; this.body = body; this.renderedBody = renderedBody; |
