mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-21 12:05:07 +01:00
Raise an error if salmon request response is unsatisfactory (#3960)
This commit is contained in:
parent
646de92781
commit
a91d968cab
@ -13,7 +13,8 @@ class SendInteractionService < BaseService
|
||||
return if block_notification?
|
||||
|
||||
envelope = salmon.pack(@xml, @source_account.keypair)
|
||||
salmon.post(@target_account.salmon_url, envelope)
|
||||
delivery = salmon.post(@target_account.salmon_url, envelope)
|
||||
raise "Delivery failed for #{target_account.salmon_url}: HTTP #{delivery.code}" unless delivery.code > 199 && delivery.code < 300
|
||||
end
|
||||
|
||||
private
|
||||
|
Loading…
Reference in New Issue
Block a user