IZ MS fixed user being a constant in the lib which causes a bug when db is reseeded
This commit is contained in:
parent
e0284b28ee
commit
b3bb9f8da2
1 changed files with 13 additions and 13 deletions
|
|
@ -97,8 +97,6 @@ module Diaspora
|
||||||
|
|
||||||
module XML
|
module XML
|
||||||
|
|
||||||
OWNER = User.owner
|
|
||||||
|
|
||||||
def self.generate(opts= {})
|
def self.generate(opts= {})
|
||||||
xml = Generate::headers(opts[:current_url])
|
xml = Generate::headers(opts[:current_url])
|
||||||
xml << Generate::author
|
xml << Generate::author
|
||||||
|
|
@ -110,6 +108,8 @@ module Diaspora
|
||||||
|
|
||||||
module Generate
|
module Generate
|
||||||
def self.headers(current_url)
|
def self.headers(current_url)
|
||||||
|
#this is retarded
|
||||||
|
@@user = User.owner
|
||||||
<<-XML
|
<<-XML
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:georss="http://www.georss.org/georss" xmlns:activity="http://activitystrea.ms/spec/1.0/" xmlns:media="http://purl.org/syndication/atommedia" xmlns:poco="http://portablecontacts.net/spec/1.0" xmlns:ostatus="http://ostatus.org/schema/1.0" xmlns:statusnet="http://status.net/schema/api/1/">
|
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:georss="http://www.georss.org/georss" xmlns:activity="http://activitystrea.ms/spec/1.0/" xmlns:media="http://purl.org/syndication/atommedia" xmlns:poco="http://portablecontacts.net/spec/1.0" xmlns:ostatus="http://ostatus.org/schema/1.0" xmlns:statusnet="http://status.net/schema/api/1/">
|
||||||
|
|
@ -124,8 +124,8 @@ module Diaspora
|
||||||
def self.author
|
def self.author
|
||||||
<<-XML
|
<<-XML
|
||||||
<author>
|
<author>
|
||||||
<name>#{OWNER.real_name}</name>
|
<name>#{@@user.real_name}</name>
|
||||||
<uri>#{OWNER.url}</uri>
|
<uri>#{@@user.url}</uri>
|
||||||
</author>
|
</author>
|
||||||
XML
|
XML
|
||||||
end
|
end
|
||||||
|
|
@ -140,9 +140,9 @@ module Diaspora
|
||||||
<<-XML
|
<<-XML
|
||||||
<activity:subject>
|
<activity:subject>
|
||||||
<activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
|
<activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
|
||||||
<id>#{OWNER.url}</id>
|
<id>#{@@user.url}</id>
|
||||||
<title>#{OWNER.real_name}</title>
|
<title>#{@@user.real_name}</title>
|
||||||
<link rel="alternative" type="text/html" href="#{OWNER.url}"/>
|
<link rel="alternative" type="text/html" href="#{@@user.url}"/>
|
||||||
</activity:subject>
|
</activity:subject>
|
||||||
XML
|
XML
|
||||||
end
|
end
|
||||||
|
|
@ -166,8 +166,8 @@ module Diaspora
|
||||||
<entry>
|
<entry>
|
||||||
<activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
|
<activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
|
||||||
<title>#{status_message.message}</title>
|
<title>#{status_message.message}</title>
|
||||||
<link rel="alternate" type="text/html" href="#{OWNER.url}status_messages/#{status_message.id}"/>
|
<link rel="alternate" type="text/html" href="#{@@user.url}status_messages/#{status_message.id}"/>
|
||||||
<id>#{OWNER.url}status_messages/#{status_message.id}</id>
|
<id>#{@@user.url}status_messages/#{status_message.id}</id>
|
||||||
<published>#{status_message.created_at.xmlschema}</published>
|
<published>#{status_message.created_at.xmlschema}</published>
|
||||||
<updated>#{status_message.updated_at.xmlschema}</updated>
|
<updated>#{status_message.updated_at.xmlschema}</updated>
|
||||||
</entry>
|
</entry>
|
||||||
|
|
@ -179,9 +179,9 @@ module Diaspora
|
||||||
<entry>
|
<entry>
|
||||||
<activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
|
<activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
|
||||||
<title>#{bookmark.title}</title>
|
<title>#{bookmark.title}</title>
|
||||||
<link rel="alternate" type="text/html" href="#{OWNER.url}bookmarks/#{bookmark.id}"/>
|
<link rel="alternate" type="text/html" href="#{@@user.url}bookmarks/#{bookmark.id}"/>
|
||||||
<link rel="related" type="text/html" href="#{bookmark.link}"/>
|
<link rel="related" type="text/html" href="#{bookmark.link}"/>
|
||||||
<id>#{OWNER.url}bookmarks/#{bookmark.id}</id>
|
<id>#{@@user.url}bookmarks/#{bookmark.id}</id>
|
||||||
<published>#{bookmark.created_at.xmlschema}</published>
|
<published>#{bookmark.created_at.xmlschema}</published>
|
||||||
<updated>#{bookmark.updated_at.xmlschema}</updated>
|
<updated>#{bookmark.updated_at.xmlschema}</updated>
|
||||||
</entry>
|
</entry>
|
||||||
|
|
@ -195,8 +195,8 @@ module Diaspora
|
||||||
<activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
|
<activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
|
||||||
<title>#{blog.title}</title>
|
<title>#{blog.title}</title>
|
||||||
<content>#{blog.body}</content>
|
<content>#{blog.body}</content>
|
||||||
<link rel="alternate" type="text/html" href="#{OWNER.url}blogs/#{blog.id}"/>
|
<link rel="alternate" type="text/html" href="#{@@user.url}blogs/#{blog.id}"/>
|
||||||
<id>#{OWNER.url}blogs/#{blog.id}</id>
|
<id>#{@@user.url}blogs/#{blog.id}</id>
|
||||||
<published>#{blog.created_at.xmlschema}</published>
|
<published>#{blog.created_at.xmlschema}</published>
|
||||||
<updated>#{blog.updated_at.xmlschema}</updated>
|
<updated>#{blog.updated_at.xmlschema}</updated>
|
||||||
</entry>
|
</entry>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue