diff options
Diffstat (limited to '')
| -rw-r--r-- | webmentions_ssg/tasks/receiver.py | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/webmentions_ssg/tasks/receiver.py b/webmentions_ssg/tasks/receiver.py index 0b7743d..2bb7222 100644 --- a/webmentions_ssg/tasks/receiver.py +++ b/webmentions_ssg/tasks/receiver.py @@ -17,7 +17,6 @@ from .. import DATABASE as db from .. import HUEY as huey from ..models import ReceivedWebmention from ..url_security import AddressResolutionError, is_public_url -from .notifications import send_webmention_notification class VerificationError(Exception): @@ -217,9 +216,7 @@ def source_mentions_target(source_url: str, target_url: str) -> bool: @huey.task(retries=2, retry_delay=50) -def verify_webmention( - webmention_uuid: uuid.UUID, send_notification: bool = True -) -> None: +def verify_webmention(webmention_uuid: uuid.UUID) -> None: """ Verify a received webmention and store its verification status. @@ -227,8 +224,6 @@ def verify_webmention( retry the task. :param webmention_uuid: Identifier of the received webmention to verify. - :param send_notification: Whether to enqueue an email notification after - successful verification. :raises TemporaryFetchError: If fetching the source fails temporarily. :raises httpx.RequestError: If an HTTP request error occurs while fetching the source. @@ -270,12 +265,3 @@ def verify_webmention( webmention.failure_reason = "Source does not mention target" db.session.commit() - - if send_notification: - try: - send_webmention_notification(webmention_uuid) - except Exception: - # Notification delivery must not change the persisted verification status. - current_app.logger.exception( - "Could not enqueue webmention notification for %s", webmention_uuid - ) |
