mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-31 21:41:33 +00:00
Fixing PuSH by using the correct hub url. Thanks to @donmelton for finding the bug.
This commit is contained in:
parent
9c8a102f04
commit
bcc24c1253
2 changed files with 5 additions and 5 deletions
|
@ -73,8 +73,8 @@ class PushSubscriptionManager(models.Manager):
|
|||
subscription = self.subscribe(extracted_topic.group(1),
|
||||
feed=feed, hub=hub, force_retry=True)
|
||||
else:
|
||||
logging.debug(u' ---> [%-30s] ~FR~BKFeed failed to subscribe to push: %s' % (
|
||||
unicode(subscription.feed)[:30], error))
|
||||
logging.debug(u' ---> [%-30s] ~FR~BKFeed failed to subscribe to push: %s (code: %s)' % (
|
||||
unicode(subscription.feed)[:30], error, response and response.status_code))
|
||||
|
||||
subscription.save()
|
||||
feed.setup_push()
|
||||
|
|
|
@ -59,8 +59,8 @@ class FetchFeed:
|
|||
etag = None
|
||||
|
||||
USER_AGENT = 'NewsBlur Feed Fetcher - %s subscriber%s - %s (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/536.2.3 (KHTML, like Gecko) Version/5.2)' % (
|
||||
self.feed.num_subscribers,
|
||||
's' if self.feed.num_subscribers != 1 else '',
|
||||
f.num_subscribers,
|
||||
's' if f.num_subscribers != 1 else '',
|
||||
settings.NEWSBLUR_URL
|
||||
)
|
||||
if self.options.get('feed_xml'):
|
||||
|
@ -231,7 +231,7 @@ class ProcessFeed:
|
|||
hub_url = None
|
||||
self_url = self.feed.feed_address
|
||||
for link in self.fpf.feed.links:
|
||||
if link['rel'] == 'hub':
|
||||
if link['rel'] == 'hub' and not hub_url:
|
||||
hub_url = link['href']
|
||||
elif link['rel'] == 'self':
|
||||
self_url = link['href']
|
||||
|
|
Loading…
Add table
Reference in a new issue