atom-feed content changed to html, use better post-title extractor

Valid atom feed. Also these features are partially included:
- http://activitystrea.ms/specs/atom/1.0/#activity.verb
- http://portablecontacts.net/draft-spec.html#anchor16
This commit is contained in:
Faldrian 2014-03-08 22:11:27 +01:00
parent c3c2129e95
commit da0b305514

View file

@ -32,8 +32,8 @@ atom_feed({'xmlns:thr' => 'http://purl.org/syndication/thread/1.0',
feed.entry post, :url => "#{@user.url}p/#{post.id}",
:id => "#{@user.url}p/#{post.id}" do |entry|
entry.title truncate(post.formatted_message(:plain_text => true), :length => 50)
entry.content auto_link(post.formatted_message(:plain_text => true)), :type => 'html'
entry.title post_page_title(post)
entry.content markdownify(post), :type => 'html'
entry.tag! 'activity:verb', 'http://activitystrea.ms/schema/1.0/post'
entry.tag! 'activity:object-type', 'http://activitystrea.ms/schema/1.0/note'
end