mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FIX: correctly add user info data to message serializer (#20348)
Previous commit 479c0a3051
was done with the assumption that this info was defined on user serializer but it was actually defined on post serializer in core. This commit extends the user serializer for messages to add this data to the user.
Also correctly adds serializer test to ensure we actually have this data.
This commit is contained in:
@ -135,7 +135,6 @@ module("Discourse Chat | Component | chat-message-info", function (hooks) {
|
||||
username: "discobot",
|
||||
admin: true,
|
||||
moderator: true,
|
||||
groupModerator: true,
|
||||
new_user: true,
|
||||
primary_group_name: "foo",
|
||||
},
|
||||
@ -147,7 +146,6 @@ module("Discourse Chat | Component | chat-message-info", function (hooks) {
|
||||
assert.dom(".chat-message-info__username.is-staff").exists();
|
||||
assert.dom(".chat-message-info__username.is-admin").exists();
|
||||
assert.dom(".chat-message-info__username.is-moderator").exists();
|
||||
assert.dom(".chat-message-info__username.is-category-moderator ").exists();
|
||||
assert.dom(".chat-message-info__username.is-new-user").exists();
|
||||
assert.dom(".chat-message-info__username.group--foo").exists();
|
||||
});
|
||||
@ -160,9 +158,6 @@ module("Discourse Chat | Component | chat-message-info", function (hooks) {
|
||||
assert.dom(".chat-message-info__username.is-staff").doesNotExist();
|
||||
assert.dom(".chat-message-info__username.is-admin").doesNotExist();
|
||||
assert.dom(".chat-message-info__username.is-moderator").doesNotExist();
|
||||
assert
|
||||
.dom(".chat-message-info__username.is-category-moderator ")
|
||||
.doesNotExist();
|
||||
assert.dom(".chat-message-info__username.is-new-user").doesNotExist();
|
||||
assert.dom(".chat-message-info__username.group--foo").doesNotExist();
|
||||
});
|
||||
|
Reference in New Issue
Block a user