about summary refs log tree commit diff
path: root/app/services/send_interaction_service.rb
diff options
context:
space:
mode:
authorbeatrix <beatrix.bitrot@gmail.com>2017-07-20 11:24:32 -0400
committerGitHub <noreply@github.com>2017-07-20 11:24:32 -0400
commite7edb4d1eeba6c12a1c71271faa30d2bbf00d054 (patch)
treef373d05c4ea43bd335910f3603fab3d866a2486e /app/services/send_interaction_service.rb
parentd2352246920800e491466d84b0146feb4d1d791f (diff)
parent1fcdaafa6fbe6d746a096c33263d76e6819da46d (diff)
Merge pull request #87 from tootsuite/master
merge upstream
Diffstat (limited to 'app/services/send_interaction_service.rb')
-rw-r--r--app/services/send_interaction_service.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/send_interaction_service.rb b/app/services/send_interaction_service.rb
index ef38a748b..c11813abc 100644
--- a/app/services/send_interaction_service.rb
+++ b/app/services/send_interaction_service.rb
@@ -10,11 +10,11 @@ class SendInteractionService < BaseService
     @source_account = source_account
     @target_account = target_account
 
-    return if block_notification?
+    return if !target_account.ostatus? || block_notification?
 
     delivery = build_request.perform
 
-    raise "Delivery failed for #{target_account.salmon_url}: HTTP #{delivery.code}" unless delivery.code > 199 && delivery.code < 300
+    raise Mastodon::UnexpectedResponseError, delivery unless delivery.code > 199 && delivery.code < 300
   end
 
   private