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. --- tests/test_views.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/test_views.py') diff --git a/tests/test_views.py b/tests/test_views.py index 54098db..ed944c9 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -156,7 +156,7 @@ def test_endpoint_creates_webmention( identifier = webmention.uuid assert response.headers["Location"].endswith(str(identifier)) - verify_webmention.assert_called_once_with(identifier, send_notification=True) + verify_webmention.assert_called_once_with(identifier) def test_endpoint_is_idempotent( @@ -190,7 +190,7 @@ def test_endpoint_is_idempotent( identifier = webmention.uuid - verify_webmention.assert_called_once_with(identifier, send_notification=True) + verify_webmention.assert_called_once_with(identifier) def test_resending_resets_failure_state( @@ -229,7 +229,7 @@ def test_resending_resets_failure_state( assert webmention.status == "received" assert webmention.failure_reason is None - verify_webmention.assert_called_once_with(identifier, send_notification=False) + verify_webmention.assert_called_once_with(identifier) @pytest.mark.parametrize("path", ["/sent", f"/sent/{uuid.uuid7()}"]) @@ -604,7 +604,7 @@ def test_reverify_received_webmention( assert webmention.status == "received" assert webmention.failure_reason is None - verify_webmention.assert_called_once_with(identifier, send_notification=False) + verify_webmention.assert_called_once_with(identifier) def test_rescan_sent_sources_requires_login(client: FlaskClient) -> None: @@ -931,4 +931,4 @@ def test_endpoint_reverifies_after_cooldown( assert stored.status == "received" assert stored.failure_reason is None - verify.assert_called_once_with(identifier, send_notification=False) + verify.assert_called_once_with(identifier) -- cgit v1.3.1