Process the WebSub pings for each feed separately, because the hub.url[] syntax doesn't seem to actually work

This commit is contained in:
Danielle McLean 2017-12-19 15:44:42 +11:00
parent 778bd7d872
commit 5e524cb4f2
Signed by: 00dani
GPG Key ID: 5A5D2D1AFF12EEC5
1 changed files with 5 additions and 2 deletions

View File

@ -6,8 +6,11 @@ from ronkyuu import webmention
@job
def ping_hub(*urls):
data = [('hub.mode', 'publish')] + [('hub.url[]', url) for url in urls]
requests.post(settings.PUSH_HUB, data=data)
for url in urls:
requests.post(settings.PUSH_HUB, data={
'hub.mode': 'publish',
'hub.url': url,
})
@job