forked from 00dani/lemoncurry
WebSub-ping the kind-specific entry URLs as well, not just the generic ones
This commit is contained in:
parent
6b51531cb4
commit
e4e8beb958
1 changed files with 7 additions and 2 deletions
|
@ -27,13 +27,15 @@ def micropub(request):
|
||||||
post = request.POST
|
post = request.POST
|
||||||
if post.get('h') != 'entry':
|
if post.get('h') != 'entry':
|
||||||
return utils.bad_req('only h=entry supported')
|
return utils.bad_req('only h=entry supported')
|
||||||
entry = Entry(author=user, kind=Note.id)
|
entry = Entry(author=user)
|
||||||
|
kind = Note
|
||||||
if 'name' in post:
|
if 'name' in post:
|
||||||
entry.name = post['name']
|
entry.name = post['name']
|
||||||
entry.kind = Article.id
|
kind = Article
|
||||||
if 'content' in post:
|
if 'content' in post:
|
||||||
entry.content = post['content']
|
entry.content = post['content']
|
||||||
|
|
||||||
|
entry.kind = kind.id
|
||||||
entry.save()
|
entry.save()
|
||||||
|
|
||||||
base = utils.origin(request)
|
base = utils.origin(request)
|
||||||
|
@ -42,6 +44,9 @@ def micropub(request):
|
||||||
reverse('home:index'),
|
reverse('home:index'),
|
||||||
reverse('entries:atom'),
|
reverse('entries:atom'),
|
||||||
reverse('entries:rss'),
|
reverse('entries:rss'),
|
||||||
|
reverse('entries:' + kind.index),
|
||||||
|
reverse('entries:' + kind.atom),
|
||||||
|
reverse('entries:' + kind.rss),
|
||||||
))
|
))
|
||||||
ping_hub.delay(perma, *others)
|
ping_hub.delay(perma, *others)
|
||||||
send_mentions.delay(perma)
|
send_mentions.delay(perma)
|
||||||
|
|
Loading…
Reference in a new issue