Skip to content

Instantly share code, notes, and snippets.

@cmrd-senya
Created October 28, 2015 00:50
Show Gist options
  • Save cmrd-senya/f83b71ca575728429546 to your computer and use it in GitHub Desktop.
Save cmrd-senya/f83b71ca575728429546 to your computer and use it in GitHub Desktop.
require "diaspora_federation"
require "nokogiri"
data = "<XML><post><request><sender_handle>id@pod1</sender_handle><recipient_handle>id@pod2</recipient_handle></request></post></XML>"
e = DiasporaFederation::Salmon::XmlPayload.unpack(Nokogiri::XML::Document.parse(data).root)
puts e.sender_id
puts e.recipient_id
puts e.to_xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment