mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 09:48:06 +08:00
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:
@ -83,12 +83,12 @@ acceptance("Discourse Chat | Unit | Service | chat-guardian", function (needs) {
|
||||
set(this.currentUser, "admin", true);
|
||||
set(this.currentUser, "moderator", true);
|
||||
|
||||
channel.set("status", "read_only");
|
||||
channel.status = "read_only";
|
||||
assert.notOk(this.chatGuardian.canArchiveChannel(channel));
|
||||
channel.set("status", "open");
|
||||
channel.status = "open";
|
||||
|
||||
channel.set("status", "archived");
|
||||
channel.status = "archived";
|
||||
assert.notOk(this.chatGuardian.canArchiveChannel(channel));
|
||||
channel.set("status", "open");
|
||||
channel.status = "open";
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user