DEV: Remove chat_channel_id from chat-live-pane details (#20302)

This is unnecessary indirection, we can just have the
chat_channel_id in the message serializer and use that.
This commit is contained in:
Martin Brennan
2023-02-15 17:27:09 +10:00
committed by GitHub
parent f19044af6a
commit c65cdc0779
8 changed files with 25 additions and 33 deletions

View File

@ -8,9 +8,8 @@ module("Discourse Chat | Unit | Helpers | format-chat-date", function (hooks) {
setupRenderingTest(hooks);
test("link to chat message", async function (assert) {
this.set("details", { chat_channel_id: 1 });
this.set("message", { id: 1 });
await render(hbs`{{format-chat-date this.message this.details}}`);
this.set("message", { id: 1, chat_channel_id: 1 });
await render(hbs`{{format-chat-date this.message}}`);
assert.equal(query(".chat-time").getAttribute("href"), "/chat/c/-/1/1");
});