DEV: converts models to native classes (#21418)

- `ChatChannel`
- `UserChatChannelMembership`

Also creates a new `chat-direct-message` model used as the object for the`chatable` property of the `ChatChannel` when the `ChatChannel` is a direct message channel. When the chatable is a category a real `Category` object will now be returned.

Archive state of a `ChatChannel` is now hold in a `ChatChannelArchive` object.
This commit is contained in:
Joffrey JAFFEUX
2023-05-08 18:24:41 +02:00
committed by GitHub
parent afbeeea09f
commit 22521d3428
48 changed files with 638 additions and 624 deletions

View File

@ -131,7 +131,7 @@ module("Discourse Chat | Component | chat-channel-row", function (hooks) {
assert.dom(".chat-channel-row").doesNotHaveClass("has-unread");
this.categoryChatChannel.currentUserMembership.unread_count = 1;
this.categoryChatChannel.currentUserMembership.unreadCount = 1;
await render(hbs`<ChatChannelRow @channel={{this.categoryChatChannel}} />`);