The code powering m.abunchtell.com https://m.abunchtell.com
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 

19 řádky
489 B

  1. # frozen_string_literal: true
  2. class SendInteractionService < BaseService
  3. # Send an Atom representation of an interaction to a remote Salmon endpoint
  4. # @param [String] Entry XML
  5. # @param [Account] source_account
  6. # @param [Account] target_account
  7. def call(xml, source_account, target_account)
  8. envelope = salmon.pack(xml, source_account.keypair)
  9. salmon.post(target_account.salmon_url, envelope)
  10. end
  11. private
  12. def salmon
  13. @salmon ||= OStatus2::Salmon.new
  14. end
  15. end