Files
Joffrey JAFFEUXandGitHub 3603f6db88 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.
2023-05-08 18:24:41 +02:00

22 lines
521 B
JavaScript

import { tracked } from "@glimmer/tracking";
export default class ChatChannelArchive {
static create(args = {}) {
return new ChatChannelArchive(args);
}
@tracked failed;
@tracked completed;
@tracked messages;
@tracked topicId;
@tracked totalMessages;
constructor(args = {}) {
this.failed = args.archive_failed;
this.completed = args.archive_completed;
this.messages = args.archived_messages;
this.topicId = args.archive_topic_id;
this.totalMessages = args.total_messages;
}
}