Public profile endorsements (accounts picked by profile owner) (#8146)
This commit is contained in:
parent
80176a3814
commit
f2404de871
21 changed files with 298 additions and 6 deletions
|
@ -2,7 +2,8 @@
|
|||
|
||||
class REST::RelationshipSerializer < ActiveModel::Serializer
|
||||
attributes :id, :following, :showing_reblogs, :followed_by, :blocking,
|
||||
:muting, :muting_notifications, :requested, :domain_blocking
|
||||
:muting, :muting_notifications, :requested, :domain_blocking,
|
||||
:endorsed
|
||||
|
||||
def id
|
||||
object.id.to_s
|
||||
|
@ -41,4 +42,8 @@ class REST::RelationshipSerializer < ActiveModel::Serializer
|
|||
def domain_blocking
|
||||
instance_options[:relationships].domain_blocking[object.id] || false
|
||||
end
|
||||
|
||||
def endorsed
|
||||
instance_options[:relationships].endorsed[object.id] || false
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue