Added constraints to PendingIncomingWebmention and PendingOutgoingContent to avoid duplication.
Warning: If updating from an older version of django-wm this will delete any existing Pending... model instances.
Request timeouts are now handled gracefully.
PendingIncomingWebmention and OutgoingWebmentionStatus now implement the new RetryableMixin.
Reworked webmention processing tasks to allow failed webmentions to be retried periodically.
See settings WEBMENTIONS_MAX_RETRIES, WEBMENTIONS_RETRY_INTERVAL, WEBMENTIONS_TIMEOUT below for customisation details.
New dashboard/ view: a simple overview of recent mentions.
Shows the latest instances of Webmention, OutgoingWebmentionStatus, PendingIncomingWebmention, PendingOutgoingContent and info on their current status.
By default, restricted to users with mentions.view_webmention_dashboard permission.
Can be made public via settings.WEBMENTIONS_DASHBOARD_PUBLIC = True.
New optional settings:
settings.WEBMENTIONS_TIMEOUT [float | default=10] specifies the time (in seconds) to wait for network calls to resolve.
settings.WEBMENTIONS_RETRY_INTERVAL [int | default=600] specifies the minimum time (in seconds) to wait before retrying to process a webmention.
settings.WEBMENTIONS_MAX_RETRIES [int | default=5] specifies how many times we can attempt to process a mention before giving up.
settings.WEBMENTIONS_DASHBOARD_PUBLIC [bool | default=False] specifies whether the the dashboard/ view can be viewed by anyone. If False (default), the dashboard/ view is only available to users with mentions.view_webmention_dashboard permission.
WebmentionHeadMiddleware
Removed port from generated endpoint URL in HTTP headers as request.META.SERVER_PORT may not be reliable depending on reverse proxy configuration.
MentionableMixin:
mentions() is now a method, not a property.
Removed field allow_incoming_webmentions as it has never been used for anything.
Streamlined template tags
{% load webmentions_endpoint %} replaced by {% load webmentions %}.
{% webmention_endpoint %} replaced by {% webmentions_endpoint %} (used in HTML <head>).
New tag {% webmentions_dashboard %} creates a link to your webmentions/dashboard/ view.
3.0.0 (2022-09-29)
Upgrade warning
If upgrading from an older version please be aware of these changes:
MentionableMixin.allow_incoming_webmentions
field has been removed.PendingIncomingWebmention
andPendingOutgoingContent
will be deleted.Changes
Thanks to @philgyford for reporting most of the issues referenced here.
Resolves #25.
Added
QuotableMixin.post_type
field.Incoming webmentions are now checked for the following microformat properties that describe the type of mention they are:
u-bookmark-of
u-like-of
u-listen-of
u-in-reply-to
u-repost-of
u-translation-of
u-watch-of
The
/webmention/get
endpoint serializes these values in thetype
field respectively as:bookmark
like
listen
reply
repost
translation
watch
If no specific
type
is specified this defaults towebmention
.Resolves #30
MentionableMixin.should_process_webmentions() -> bool
method to enable custom logic.Resolves #31
Resolves #32
Resolves #33, #34
h-card
.h-card
that is directly related to the mention link (embedded inp-author
of a parenth-entry
orh-feed
container).h-card
on the page.HCard.from_soup()
classmethod. Parsing logic moved totasks.incoming.parsing
package.Resolves #36
PendingIncomingWebmention
andPendingOutgoingContent
to avoid duplication.django-wm
this will delete any existingPending...
model instances.PendingIncomingWebmention
andOutgoingWebmentionStatus
now implement the newRetryableMixin
.WEBMENTIONS_MAX_RETRIES
,WEBMENTIONS_RETRY_INTERVAL
,WEBMENTIONS_TIMEOUT
below for customisation details.New
dashboard/
view: a simple overview of recent mentions.Webmention
,OutgoingWebmentionStatus
,PendingIncomingWebmention
,PendingOutgoingContent
and info on their current status.mentions.view_webmention_dashboard
permission.settings.WEBMENTIONS_DASHBOARD_PUBLIC = True
.New optional settings:
settings.WEBMENTIONS_TIMEOUT
[float
| default=10
] specifies the time (in seconds) to wait for network calls to resolve.settings.WEBMENTIONS_RETRY_INTERVAL
[int
| default=600
] specifies the minimum time (in seconds) to wait before retrying to process a webmention.settings.WEBMENTIONS_MAX_RETRIES
[int
| default=5
] specifies how many times we can attempt to process a mention before giving up.settings.WEBMENTIONS_DASHBOARD_PUBLIC
[bool
| default=False
] specifies whether the thedashboard/
view can be viewed by anyone. IfFalse
(default), thedashboard/
view is only available to users withmentions.view_webmention_dashboard
permission.WebmentionHeadMiddleware
request.META.SERVER_PORT
may not be reliable depending on reverse proxy configuration.MentionableMixin
:mentions()
is now a method, not a property.allow_incoming_webmentions
as it has never been used for anything.Streamlined template tags
{% load webmentions_endpoint %}
replaced by{% load webmentions %}
.{% webmention_endpoint %}
replaced by{% webmentions_endpoint %}
(used in HTML<head>
).{% webmentions_dashboard %}
creates a link to yourwebmentions/dashboard/
view.