mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 11:15:05 +08:00
FIX: add status to channel membership serializer (#25906)
This commit is contained in:
parent
7a14831695
commit
fe851a533a
|
@ -2,10 +2,11 @@
|
|||
|
||||
module Chat
|
||||
class UserChannelMembershipSerializer < BaseChannelMembershipSerializer
|
||||
has_one :user, serializer: ::Chat::ChatableUserSerializer, embed: :objects
|
||||
has_one :user, embed: :objects
|
||||
|
||||
def user
|
||||
object.user || Chat::NullUser.new
|
||||
user = object.user || Chat::NullUser.new
|
||||
Chat::BasicUserSerializer.new(user, root: false, scope: scope, include_status: true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
"name": { "type": "string" },
|
||||
"avatar_template": { "type": "string" },
|
||||
"username": { "type": "string" },
|
||||
"custom_fields": { "type": ["object", "null"] },
|
||||
"can_chat": { "type": "boolean" },
|
||||
"has_chat_enabled": { "type": "boolean" }
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ RSpec.describe "Channel - Info - Members page", type: :system do
|
|||
end
|
||||
|
||||
context "with user status" do
|
||||
xit "renders status next to name" do
|
||||
it "renders status next to name" do
|
||||
SiteSetting.enable_user_status = true
|
||||
current_user.set_status!("walking the dog", "dog")
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user