diff --git a/app/serializers/post_serializer.rb b/app/serializers/post_serializer.rb index f12ad4fccac..e66fa720fd6 100644 --- a/app/serializers/post_serializer.rb +++ b/app/serializers/post_serializer.rb @@ -374,6 +374,10 @@ class PostSerializer < BasicPostSerializer object.revisions.size > 0 end + def include_hidden_reason_id? + object.hidden + end + private def topic diff --git a/app/serializers/web_hook_post_serializer.rb b/app/serializers/web_hook_post_serializer.rb index 31e214cecc7..455c1383e7c 100644 --- a/app/serializers/web_hook_post_serializer.rb +++ b/app/serializers/web_hook_post_serializer.rb @@ -12,6 +12,12 @@ class WebHookPostSerializer < PostSerializer can_delete can_recover can_wiki + actions_summary + can_view_edit_history + yours + primary_group_flair_url + primary_group_flair_bg_color + primary_group_flair_color }.each do |attr| define_method("include_#{attr}?") do false diff --git a/spec/serializers/web_hook_post_serializer_spec.rb b/spec/serializers/web_hook_post_serializer_spec.rb index 51cd4507461..2d56df376cd 100644 --- a/spec/serializers/web_hook_post_serializer_spec.rb +++ b/spec/serializers/web_hook_post_serializer_spec.rb @@ -10,7 +10,7 @@ RSpec.describe WebHookPostSerializer do it 'should only include the required keys' do count = serialized_for_user(admin).keys.count - difference = count - 41 + difference = count - 34 expect(difference).to eq(0), lambda { message = ""