about summary refs log tree commit diff
path: root/app/serializers/rest/relationship_serializer.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2018-08-11 15:28:06 +0200
committerGitHub <noreply@github.com>2018-08-11 15:28:06 +0200
commitd787bcdeb1570e4d8d67f326dadaf321a6854e06 (patch)
treefa23a187b16bf07635312a7791013aacfc2c4474 /app/serializers/rest/relationship_serializer.rb
parent03afc365d530e6d57754ae9dbbdbd0c56431ee02 (diff)
parent7067b64de33f9cd491e97329df266fde5fb49e42 (diff)
Merge pull request #630 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/serializers/rest/relationship_serializer.rb')
-rw-r--r--app/serializers/rest/relationship_serializer.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/serializers/rest/relationship_serializer.rb b/app/serializers/rest/relationship_serializer.rb
index 45bfd4d6e..c6c722a54 100644
--- a/app/serializers/rest/relationship_serializer.rb
+++ b/app/serializers/rest/relationship_serializer.rb
@@ -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