Skip to content

Commit

Permalink
Give priority to ATOM to expose WebSub.
Browse files Browse the repository at this point in the history
Hello,
The ATOM feed contains the hub declaration for WebSub / PubSubHubbub, but the RSS / RDF / JSON versions do not.
Currently, the ATOM version is declared last.
RSS/ATOM clients typically pick whichever version comes first, and will thus not see the WebSub feature.
I therefore suggest putting the ATOM version first, as it is more feature-rich than the other versions.

Clients not compatible with ATOM would not pick it anyway due to the different type attribute.

See same PR for Mastodon: mastodon/mastodon#9302
and WebSub tester https://websub.rocks/publisher
  • Loading branch information
Alkarex committed Nov 20, 2018
1 parent b3c3af1 commit e473937
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions actions/public.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,23 +97,23 @@ function showSections()
*/
function getFeeds()
{
return array(new Feed(Feed::JSON,
return array(new Feed(Feed::ATOM,
common_local_url('ApiTimelinePublic',
array('format' => 'atom')),
// TRANS: Link description for public timeline feed.
_('Public Timeline Feed (Atom)')),
new Feed(Feed::JSON,
common_local_url('ApiTimelinePublic',
array('format' => 'as')),
// TRANS: Link description for public timeline feed.
_('Public Timeline Feed (Activity Streams JSON)')),
new Feed(Feed::RSS1, common_local_url('publicrss'),
// TRANS: Link description for public timeline feed.
_('Public Timeline Feed (RSS 1.0)')),
new Feed(Feed::RSS2,
new Feed(Feed::RSS2,
common_local_url('ApiTimelinePublic',
array('format' => 'rss')),
// TRANS: Link description for public timeline feed.
_('Public Timeline Feed (RSS 2.0)')),
new Feed(Feed::ATOM,
common_local_url('ApiTimelinePublic',
array('format' => 'atom')),
// TRANS: Link description for public timeline feed.
_('Public Timeline Feed (Atom)')));
_('Public Timeline Feed (RSS 2.0)')));
}
}

0 comments on commit e473937

Please sign in to comment.