From edd7c0c2220ba12c2a773f9ba1cf6e0e7a273856 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Thu, 29 Oct 2026 20:59:48 +0100 Subject: feat(receiver): send Webmention notification digests Batch verified Webmention notifications into a scheduled digest so bursts of incoming mentions do not generate a separate email for every verification. Track which mentions have already been reported and leave them pending when SMTP delivery fails so a later digest can retry safely. --- webmentions_ssg/views.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'webmentions_ssg/views.py') diff --git a/webmentions_ssg/views.py b/webmentions_ssg/views.py index bb1f38a..7a97480 100644 --- a/webmentions_ssg/views.py +++ b/webmentions_ssg/views.py @@ -170,7 +170,7 @@ def reverify_received_webmention(identifier: uuid.UUID) -> ResponseReturnValue: db.session.commit() - verify_webmention(identifier, send_notification=False) + verify_webmention(identifier) flash(f"Webmention {webmention.uuid} queued for reverification.", "success") @@ -327,7 +327,6 @@ def endpoint() -> ResponseReturnValue: ).scalar_one_or_none() should_verify = False - send_notification = False if webmention is None: identifier = uuid.uuid7() @@ -339,7 +338,6 @@ def endpoint() -> ResponseReturnValue: try: db.session.commit() should_verify = True - send_notification = True except sa_exc.IntegrityError: db.session.rollback() @@ -377,7 +375,7 @@ def endpoint() -> ResponseReturnValue: identifier = webmention.uuid if should_verify: - verify_webmention(identifier, send_notification=send_notification) + verify_webmention(identifier) status_url = url_for("root.status", identifier=str(identifier), _external=True) -- cgit v1.3.1