8000 Tasks · beatonma/django-wm Wiki · GitHub
[go: up one dir, main page]

Skip to content
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.

Running tasks

These tasks may be handled by Celery, or batch processed by running the mentions_pending management command.

Sending a webmention

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:

  1. Fetch the target of the link.
  2. Check the response to find a webmention endpoint.
  3. 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/"
}
  1. The target server will/should then do some checks to verify your webmention.

Receiving a 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:

  1. Check that the target URL points to something on our server.
  2. Fetch the source content.
  3. Check that the source content actually contains a link to the target.
  4. Parse the context of the target link in the source content to try and find an author's h-card and any microformat tags that add context to the webmention.
0