about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
Diffstat (limited to 'app/services')
-rw-r--r--app/services/favourite_service.rb8
-rw-r--r--app/services/fetch_atom_service.rb2
-rw-r--r--app/services/unfavourite_service.rb8
3 files changed, 6 insertions, 12 deletions
diff --git a/app/services/favourite_service.rb b/app/services/favourite_service.rb
index 11585250f..7038bc222 100644
--- a/app/services/favourite_service.rb
+++ b/app/services/favourite_service.rb
@@ -31,14 +31,10 @@ class FavouriteService < BaseService
         end
 
         object_type xml, :activity
-        verb xml, :favourite
+        verb xml, :favorite
 
         target(xml) do
-          author(xml) do
-            include_author xml, favourite.status.account
-          end
-
-          include_entry xml, favourite.status.stream_entry
+          include_target xml, favourite.status
         end
       end
     end.to_xml
diff --git a/app/services/fetch_atom_service.rb b/app/services/fetch_atom_service.rb
index 98ee1db84..f7e9c150a 100644
--- a/app/services/fetch_atom_service.rb
+++ b/app/services/fetch_atom_service.rb
@@ -2,6 +2,8 @@
 
 class FetchAtomService < BaseService
   def call(url)
+    return if url.blank?
+
     response = http_client.head(url)
 
     Rails.logger.debug "Remote status HEAD request returned code #{response.code}"
diff --git a/app/services/unfavourite_service.rb b/app/services/unfavourite_service.rb
index b79b8a938..7ad1778f6 100644
--- a/app/services/unfavourite_service.rb
+++ b/app/services/unfavourite_service.rb
@@ -22,14 +22,10 @@ class UnfavouriteService < BaseService
         end
 
         object_type xml, :activity
-        verb xml, :unfavourite
+        verb xml, :unfavorite
 
         target(xml) do
-          author(xml) do
-            include_author xml, favourite.status.account
-          end
-
-          include_entry xml, favourite.status.stream_entry
+          include_target xml, favourite.status
         end
       end
     end.to_xml