diff --git a/app/models/activity_streams/photo.rb b/app/models/activity_streams/photo.rb index 44ada54b2..b153cc68d 100644 --- a/app/models/activity_streams/photo.rb +++ b/app/models/activity_streams/photo.rb @@ -5,7 +5,7 @@ class ActivityStreams::Photo < Post include Diaspora::Socketable - xml_name "activity_streams::_photo" + xml_name self.name.underscore.gsub!('/', '-') xml_attr :image_url xml_attr :image_height xml_attr :image_width diff --git a/lib/diaspora/parser.rb b/lib/diaspora/parser.rb index ca8579eee..c099b33cc 100644 --- a/lib/diaspora/parser.rb +++ b/lib/diaspora/parser.rb @@ -7,7 +7,8 @@ module Diaspora def self.from_xml(xml) doc = Nokogiri::XML(xml) { |cfg| cfg.noblanks } return unless body = doc.xpath("/XML/post").children.first - body.name.camelize.constantize.from_xml body.to_s + class_name = body.name.gsub('-', '/') + class_name.camelize.constantize.from_xml body.to_s end end end