about summary refs log tree commit diff
path: root/app/serializers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-09-23 05:40:28 +0200
committerGitHub <noreply@github.com>2017-09-23 05:40:28 +0200
commit66126f302167d21e4bf247e660f595ff0beaaf20 (patch)
treec63eb3ba86ec37d2a0a7fd0f39e62a1c86f785d3 /app/serializers
parent293972f716476933df2b665ad755cafe4d29d82d (diff)
Add custom emojis to the emoji picker (#5052)
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/initial_state_serializer.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/serializers/initial_state_serializer.rb b/app/serializers/initial_state_serializer.rb
index 88bbc0dff..e2f15a601 100644
--- a/app/serializers/initial_state_serializer.rb
+++ b/app/serializers/initial_state_serializer.rb
@@ -4,6 +4,12 @@ class InitialStateSerializer < ActiveModel::Serializer
   attributes :meta, :compose, :accounts,
              :media_attachments, :settings, :push_subscription
 
+  has_many :custom_emojis, serializer: REST::CustomEmojiSerializer
+
+  def custom_emojis
+    CustomEmoji.local
+  end
+
   def meta
     store = {
       streaming_api_base_url: Rails.configuration.x.streaming_api_base_url,