diff options
author | Starfall <us@starfall.systems> | 2022-11-10 08:50:11 -0600 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2022-11-10 08:50:11 -0600 |
commit | 67d1a0476d77e2ed0ca15dd2981c54c2b90b0742 (patch) | |
tree | 152f8c13a341d76738e8e2c09b24711936e6af68 /app/serializers/rest/relationship_serializer.rb | |
parent | b581e6b6d4a5ba9ed4ae17427b7f2d5d158be4e5 (diff) | |
parent | ee7e49d1b1323618e16026bc8db8ab7f9459cc2d (diff) |
Merge remote-tracking branch 'glitch/main'
- Remove Helm charts - Lots of conflicts with our removal of recommended settings and custom icons
Diffstat (limited to 'app/serializers/rest/relationship_serializer.rb')
-rw-r--r-- | app/serializers/rest/relationship_serializer.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/serializers/rest/relationship_serializer.rb b/app/serializers/rest/relationship_serializer.rb index afd4cddf9..31fc60eb2 100644 --- a/app/serializers/rest/relationship_serializer.rb +++ b/app/serializers/rest/relationship_serializer.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class REST::RelationshipSerializer < ActiveModel::Serializer - attributes :id, :following, :showing_reblogs, :notifying, :followed_by, + attributes :id, :following, :showing_reblogs, :notifying, :languages, :followed_by, :blocking, :blocked_by, :muting, :muting_notifications, :requested, :domain_blocking, :endorsed, :note @@ -25,6 +25,11 @@ class REST::RelationshipSerializer < ActiveModel::Serializer false end + def languages + (instance_options[:relationships].following[object.id] || {})[:languages] || + (instance_options[:relationships].requested[object.id] || {})[:languages] + end + def followed_by instance_options[:relationships].followed_by[object.id] || false end |