Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `README.md`: Discarded upstream changes: we have our own README - `app/controllers/follower_accounts_controller.rb`: Port upstream's minor refactoring
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
|
||||
class REST::RelationshipSerializer < ActiveModel::Serializer
|
||||
attributes :id, :following, :showing_reblogs, :notifying, :languages, :followed_by,
|
||||
:blocking, :blocked_by, :muting, :muting_notifications, :requested,
|
||||
:domain_blocking, :endorsed, :note
|
||||
:blocking, :blocked_by, :muting, :muting_notifications,
|
||||
:requested, :requested_by, :domain_blocking, :endorsed, :note
|
||||
|
||||
def id
|
||||
object.id.to_s
|
||||
@@ -54,6 +54,10 @@ class REST::RelationshipSerializer < ActiveModel::Serializer
|
||||
instance_options[:relationships].requested[object.id] ? true : false
|
||||
end
|
||||
|
||||
def requested_by
|
||||
instance_options[:relationships].requested_by[object.id] ? true : false
|
||||
end
|
||||
|
||||
def domain_blocking
|
||||
instance_options[:relationships].domain_blocking[object.id] || false
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user