diff options
| author | Dennis Fink | 2026-10-29 20:59:48 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-10-29 20:59:48 +0100 |
| commit | edd7c0c2220ba12c2a773f9ba1cf6e0e7a273856 (patch) | |
| tree | c067d16841e3d3441e3b4c6f7ed833a6d57fae04 /webmentions_ssg/views.py | |
| parent | 9a1e863079b64883beadaba7b283621f1b3cf70a (diff) | |
| download | webmentions-ssg-edd7c0c2220ba12c2a773f9ba1cf6e0e7a273856.tar.gz webmentions-ssg-edd7c0c2220ba12c2a773f9ba1cf6e0e7a273856.zip | |
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.
Diffstat (limited to '')
| -rw-r--r-- | webmentions_ssg/views.py | 6 |
1 files changed, 2 insertions, 4 deletions
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) |
