about summary refs log tree commit diff
path: root/app/serializers
diff options
context:
space:
mode:
authorDavid Yip <yipdw@member.fsf.org>2018-04-01 20:24:50 -0500
committerDavid Yip <yipdw@member.fsf.org>2018-04-01 20:24:50 -0500
commiteb39db7f93061c936fcb0bb24d5ba0c9a6186993 (patch)
treee12b5f5c9fec1d698024c88cd9f3ea9fe5b249cd /app/serializers
parentf0bb3ff53307aac7b9c64ec8a48d4ba1d2019513 (diff)
parentf890d2a766ae4c7fd8611dd4f3a15a13408f68c3 (diff)
Merge remote-tracking branch 'origin/master' into gs-master
  Conflicts:
 	app/javascript/mastodon/locales/en.json
 	app/javascript/mastodon/locales/ja.json
 	app/javascript/mastodon/locales/pl.json
 	app/views/accounts/_header.html.haml
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/activitypub/actor_serializer.rb9
-rw-r--r--app/serializers/rest/account_serializer.rb2
2 files changed, 10 insertions, 1 deletions
diff --git a/app/serializers/activitypub/actor_serializer.rb b/app/serializers/activitypub/actor_serializer.rb
index afcd37771..df3090726 100644
--- a/app/serializers/activitypub/actor_serializer.rb
+++ b/app/serializers/activitypub/actor_serializer.rb
@@ -10,6 +10,8 @@ class ActivityPub::ActorSerializer < ActiveModel::Serializer
 
   has_one :public_key, serializer: ActivityPub::PublicKeySerializer
 
+  has_many :virtual_tags, key: :tag
+
   attribute :moved_to, if: :moved?
 
   class EndpointsSerializer < ActiveModel::Serializer
@@ -101,7 +103,14 @@ class ActivityPub::ActorSerializer < ActiveModel::Serializer
     object.locked
   end
 
+  def virtual_tags
+    object.emojis
+  end
+
   def moved_to
     ActivityPub::TagManager.instance.uri_for(object.moved_to_account)
   end
+
+  class CustomEmojiSerializer < ActivityPub::EmojiSerializer
+  end
 end
diff --git a/app/serializers/rest/account_serializer.rb b/app/serializers/rest/account_serializer.rb
index 19b746520..6097acda5 100644
--- a/app/serializers/rest/account_serializer.rb
+++ b/app/serializers/rest/account_serializer.rb
@@ -14,7 +14,7 @@ class REST::AccountSerializer < ActiveModel::Serializer
   end
 
   def note
-    Formatter.instance.simplified_format(object)
+    Formatter.instance.simplified_format(object, custom_emojify: true)
   end
 
   def url