aboutsummaryrefslogtreecommitdiff
path: root/webmentions_ssg/models.py
diff options
context:
space:
mode:
authorDennis Fink2026-10-29 20:59:48 +0100
committerDennis Fink2026-10-29 20:59:48 +0100
commitedd7c0c2220ba12c2a773f9ba1cf6e0e7a273856 (patch)
treec067d16841e3d3441e3b4c6f7ed833a6d57fae04 /webmentions_ssg/models.py
parent9a1e863079b64883beadaba7b283621f1b3cf70a (diff)
downloadwebmentions-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/models.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/webmentions_ssg/models.py b/webmentions_ssg/models.py
index 688da67..11740a8 100644
--- a/webmentions_ssg/models.py
+++ b/webmentions_ssg/models.py
@@ -110,6 +110,10 @@ class ReceivedWebmention(Base):
nullable=False,
)
+ notification_sent_at: Mapped[datetime | None] = mapped_column(
+ DateTime(timezone=True), nullable=True, default=None
+ )
+
__table_args__ = (
UniqueConstraint("source", "target", name="uq_webmention_source_target"),
)