about summary refs log tree commit diff
path: root/app/services/favourite_service.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-02-13 13:30:33 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-02-13 13:30:33 +0100
commit8e08ae5bb91868d727fdd877aba0133744ad9934 (patch)
treeeff2e42508f098ba524167b21b4a561fad070066 /app/services/favourite_service.rb
parentdf63461ff091f6b513c797d010f82dee73f437b2 (diff)
Add IDs to salmon slaps even if they are transient. Add title, too, mostly
in case of debugging incoming salmons. Add <thr:in-reply-to /> to favourite
salmons because it seems to be required by GS.
Diffstat (limited to 'app/services/favourite_service.rb')
-rw-r--r--app/services/favourite_service.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/services/favourite_service.rb b/app/services/favourite_service.rb
index 7038bc222..824729ed6 100644
--- a/app/services/favourite_service.rb
+++ b/app/services/favourite_service.rb
@@ -24,6 +24,7 @@ class FavouriteService < BaseService
   def build_xml(favourite)
     Nokogiri::XML::Builder.new do |xml|
       entry(xml, true) do
+        unique_id xml, favourite.created_at, favourite.id, 'Favourite'
         title xml, "#{favourite.account.acct} favourited a status by #{favourite.status.account.acct}"
 
         author(xml) do
@@ -32,6 +33,7 @@ class FavouriteService < BaseService
 
         object_type xml, :activity
         verb xml, :favorite
+        in_reply_to xml, TagManager.instance.uri_for(favourite.status), TagManager.instance.url_for(favourite.status)
 
         target(xml) do
           include_target xml, favourite.status