diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-02-23 19:17:37 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-02-23 19:17:37 +0100 |
commit | fa33750105389110a3395ca19167f789d21a149e (patch) | |
tree | 4b121a067ad46be5189301a2e3e3b2bcef8d6426 /app/views/atom/entry.xml.ruby | |
parent | 3b0bc18db928c455186273d9b9aa5b96d91e035e (diff) |
Adding reblogs, favourites, improving atom generation
Diffstat (limited to 'app/views/atom/entry.xml.ruby')
-rw-r--r-- | app/views/atom/entry.xml.ruby | 34 |
1 files changed, 3 insertions, 31 deletions
diff --git a/app/views/atom/entry.xml.ruby b/app/views/atom/entry.xml.ruby index 2a26e624a..e0e089f46 100644 --- a/app/views/atom/entry.xml.ruby +++ b/app/views/atom/entry.xml.ruby @@ -1,37 +1,9 @@ Nokogiri::XML::Builder.new do |xml| entry(xml, true) do - unique_id xml, @entry.created_at, @entry.activity_id, @entry.activity_type - published_at xml, @entry.activity.created_at - updated_at xml, @entry.activity.updated_at - title xml, @entry.title - content xml, @entry.content - verb xml, @entry.verb - author(xml) do - object_type xml, :person - uri xml, profile_url(name: @entry.account.username) - name xml, @entry.account.username - summary xml, @entry.account.note - link_alternate xml, profile_url(name: @entry.account.username) - portable_contact xml, @entry.account - end - - if @entry.targeted? - target(xml) do - object_type xml, @entry.target.object_type - simple_id xml, @entry.target.uri - title xml, @entry.target.title - summary xml, @entry.target.summary - link_alternate xml, @entry.target.uri - - if @entry.target.object_type == :person - portable_contact xml, @entry.target - end - end - else - object_type xml, @entry.object_type + include_author xml, @entry.account end - link_self xml, atom_entry_url(id: @entry.id) + include_entry xml, @entry end -end +end.to_xml |