Handle webmention endpoint discovery separately - sendWebmention() is meant to do it itself but doesn't quite work

pull/1/head
Danielle McLean 5 years ago
parent 5308e28d98
commit 5349fc4c96
Signed by: 00dani
GPG Key ID: 5A5D2D1AFF12EEC5

@ -11,7 +11,9 @@ def ping_hub(*urls):
@job
def send_mentions(url):
result = webmention.findMentions(url)
def send_mentions(source):
result = webmention.findMentions(source)
for target in result['refs']:
webmention.sendWebmention(url, target)
status, endpoint = webmention.discoverEndpoint(target)
if endpoint is not None and status == 200:
webmention.sendWebmention(source, target, endpoint)

Loading…
Cancel
Save