about summary refs log tree commit diff
path: root/app/lib/ostatus
diff options
context:
space:
mode:
authorDavid Underwood <davefp@gmail.com>2018-04-01 17:55:42 -0400
committerEugen Rochko <eugen@zeonfederated.com>2018-04-01 23:55:42 +0200
commit123a343d116d3e83cbd04460cc7bd0b6f3d208c4 (patch)
tree7d834be5438d835fe90744e0ba011f585cf252b1 /app/lib/ostatus
parentf464f98fd3b8ef33b3afa5acf09e829c046134de (diff)
[WIP] Enable custom emoji on account pages and in the sidebar (#6124)
Federate custom emojis with accounts
Diffstat (limited to 'app/lib/ostatus')
-rw-r--r--app/lib/ostatus/atom_serializer.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/lib/ostatus/atom_serializer.rb b/app/lib/ostatus/atom_serializer.rb
index 46d0a8b37..055b4649c 100644
--- a/app/lib/ostatus/atom_serializer.rb
+++ b/app/lib/ostatus/atom_serializer.rb
@@ -26,6 +26,9 @@ class OStatus::AtomSerializer
     append_element(author, 'link', nil, rel: :alternate, type: 'text/html', href: ::TagManager.instance.url_for(account))
     append_element(author, 'link', nil, rel: :avatar, type: account.avatar_content_type, 'media:width': 120, 'media:height': 120, href: full_asset_url(account.avatar.url(:original))) if account.avatar?
     append_element(author, 'link', nil, rel: :header, type: account.header_content_type, 'media:width': 700, 'media:height': 335, href: full_asset_url(account.header.url(:original))) if account.header?
+    account.emojis.each do |emoji|
+      append_element(author, 'link', nil, rel: :emoji, href: full_asset_url(emoji.image.url), name: emoji.shortcode)
+    end
     append_element(author, 'poco:preferredUsername', account.username)
     append_element(author, 'poco:displayName', account.display_name) if account.display_name?
     append_element(author, 'poco:note', account.local? ? account.note : strip_tags(account.note)) if account.note?