From 3cc2fe798f772ffdc5398098bfd53ee31803cb84 Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Mon, 6 Nov 2017 21:05:00 +1100 Subject: [PATCH] Whoops, fix up the WebSub ping implementation - it should actually work now --- entries/jobs.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/entries/jobs.py b/entries/jobs.py index f20d013..b5004ae 100644 --- a/entries/jobs.py +++ b/entries/jobs.py @@ -1,12 +1,9 @@ import requests from django.conf import settings from django_rq import job -from urllib.parse import urlencode @job def ping_hub(*urls): - requests.post(settings.PUSH_HUB, data={ - 'hub.mode': 'publish', - 'hub.url': ','.join(map(urlencode, urls)), - }) + data = [('hub.mode', 'publish')] + [('hub.url[]', url) for url in urls] + requests.post(settings.PUSH_HUB, data=data)