Repository navigation
Tasks
Michael Beaton edited this page Dec 22, 2022
·
8 revisions
Sending or receiving a webmention can take some time to complete so these processes are handled in tasks which run separately from your main server process.
These tasks may be handled by Celery, or batch processed by running the mentions_pending management command.
When you save your MentionableMixin model instance, django-wm will scan its HTML content (via its get_content_html method) for <a> links.
For each link found, django-wm will:
- Fetch the target of the link.
- Check the response to find a webmention endpoint.
- If found, submit a webmention to that endpoint. This will look something like:
{
"target": "https://their-domain.org/their-blog/",
"source": "https://your-domain.org/your-article/"
}- The target server will/should then do some checks to verify your webmention.
Your webmention endpoint will receive a webmention which will look something like:
{
"target": "https://your-domain.org/your-article/",
"source": "https://their-domain.org/their-blog/"
}django-wm will then:
- Check that the
targetURL points to something on our server. - Fetch the source content.
- Check that the source content actually contains a link to the
target. - Parse the context of the
targetlink in thesourcecontent to try and find an author'sh-cardand any microformat tags that add context to the webmention.