Add nohub config setting to allowed non-PuSH feeds
This commit is contained in:
parent
19f3cc112f
commit
ba9abb3c57
@ -168,7 +168,7 @@ class FeedSub extends Managed_DataObject
|
|||||||
$discover->discoverFromFeedURL($feeduri);
|
$discover->discoverFromFeedURL($feeduri);
|
||||||
|
|
||||||
$huburi = $discover->getHubLink();
|
$huburi = $discover->getHubLink();
|
||||||
if (!$huburi && !common_config('feedsub', 'fallback_hub')) {
|
if (!$huburi && !common_config('feedsub', 'fallback_hub') && !common_config('feedsub', 'nohub')) {
|
||||||
throw new FeedSubNoHubException();
|
throw new FeedSubNoHubException();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -211,8 +211,8 @@ class FeedSub extends Managed_DataObject
|
|||||||
// No native hub on this feed?
|
// No native hub on this feed?
|
||||||
// Use our fallback hub, which handles polling on our behalf.
|
// Use our fallback hub, which handles polling on our behalf.
|
||||||
} else if (common_config('feedsub', 'nohub')) {
|
} else if (common_config('feedsub', 'nohub')) {
|
||||||
// Fake it! We're just testing remote feeds w/o hubs.
|
// For this to actually work, we'll need some polling mechanism.
|
||||||
// We'll never actually get updates in this mode.
|
// The FeedPoller plugin should take care of it.
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
// TRANS: Server exception.
|
// TRANS: Server exception.
|
||||||
@ -247,8 +247,8 @@ class FeedSub extends Managed_DataObject
|
|||||||
// No native hub on this feed?
|
// No native hub on this feed?
|
||||||
// Use our fallback hub, which handles polling on our behalf.
|
// Use our fallback hub, which handles polling on our behalf.
|
||||||
} else if (common_config('feedsub', 'nohub')) {
|
} else if (common_config('feedsub', 'nohub')) {
|
||||||
// Fake it! We're just testing remote feeds w/o hubs.
|
// We need a feedpolling plugin (like FeedPoller) active so it will
|
||||||
// We'll never actually get updates in this mode.
|
// set the 'nohub' state to 'inactive' for us.
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
// TRANS: Server exception.
|
// TRANS: Server exception.
|
||||||
|
@ -1141,8 +1141,9 @@ class Ostatus_profile extends Managed_DataObject
|
|||||||
?: $discover->getAtomLink(Salmon::NS_REPLIES);
|
?: $discover->getAtomLink(Salmon::NS_REPLIES);
|
||||||
$hints['salmon'] = $salmonuri;
|
$hints['salmon'] = $salmonuri;
|
||||||
|
|
||||||
if (!$huburi && !common_config('feedsub', 'fallback_hub')) {
|
if (!$huburi && !common_config('feedsub', 'fallback_hub') && !common_config('feedsub', 'nohub')) {
|
||||||
// We can only deal with folks with a PuSH hub
|
// We can only deal with folks with a PuSH hub
|
||||||
|
// unless we have something similar available locally.
|
||||||
throw new FeedSubNoHubException();
|
throw new FeedSubNoHubException();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1534,7 +1535,7 @@ class Ostatus_profile extends Managed_DataObject
|
|||||||
$huburi = $discover->getHubLink();
|
$huburi = $discover->getHubLink();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$huburi && !common_config('feedsub', 'fallback_hub')) {
|
if (!$huburi && !common_config('feedsub', 'fallback_hub') && !common_config('feedsub', 'nohub')) {
|
||||||
// We can only deal with folks with a PuSH hub
|
// We can only deal with folks with a PuSH hub
|
||||||
throw new FeedSubNoHubException();
|
throw new FeedSubNoHubException();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user