about summary refs log tree commit diff
path: root/app/serializers
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-01-02 13:45:18 +0100
committerThibaut Girka <thib@sitedethib.com>2019-01-02 15:36:53 +0100
commit571d219bb917cefcca7419a0ad4e3889689d5f6a (patch)
tree6ab91adcb2c164fd027708e58f5fb96c52474007 /app/serializers
parentb300948526d967aaf5608c93546ee0d54940c0ef (diff)
parent66436d08959998be20c6c6bf631177d8c1f3e0d1 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts manually resolved:
- app/services/post_status_service.rb
- config/locales/simple_form.pl.yml
- config/routes.rb
- config/webpack/loaders/sass.js
- config/webpack/shared.js
- package.json
- yarn.lock
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/activitypub/actor_serializer.rb5
-rw-r--r--app/serializers/initial_state_serializer.rb1
2 files changed, 6 insertions, 0 deletions
diff --git a/app/serializers/activitypub/actor_serializer.rb b/app/serializers/activitypub/actor_serializer.rb
index 72c30dc73..6746c1782 100644
--- a/app/serializers/activitypub/actor_serializer.rb
+++ b/app/serializers/activitypub/actor_serializer.rb
@@ -14,6 +14,7 @@ class ActivityPub::ActorSerializer < ActiveModel::Serializer
   has_many :virtual_attachments, key: :attachment
 
   attribute :moved_to, if: :moved?
+  attribute :also_known_as, if: :also_known_as?
 
   class EndpointsSerializer < ActiveModel::Serializer
     include RoutingHelper
@@ -116,6 +117,10 @@ class ActivityPub::ActorSerializer < ActiveModel::Serializer
     ActivityPub::TagManager.instance.uri_for(object.moved_to_account)
   end
 
+  def also_known_as?
+    !object.also_known_as.empty?
+  end
+
   class CustomEmojiSerializer < ActivityPub::EmojiSerializer
   end
 
diff --git a/app/serializers/initial_state_serializer.rb b/app/serializers/initial_state_serializer.rb
index 5b88cb9a8..19817e89e 100644
--- a/app/serializers/initial_state_serializer.rb
+++ b/app/serializers/initial_state_serializer.rb
@@ -22,6 +22,7 @@ class InitialStateSerializer < ActiveModel::Serializer
       version: Mastodon::Version.to_s,
       invites_enabled: Setting.min_invite_role == 'user',
       mascot: instance_presenter.mascot&.file&.url,
+      profile_directory: Setting.profile_directory,
     }
 
     if object.current_account