Deliver per (inbox, domain) — federation actor gets all posts too
Add app_domain to APDeliveryLog so the same activity can be delivered to the same inbox under different actor identities (blog + federation).
This commit is contained in:
@@ -454,12 +454,13 @@ class APDeliveryLog(Base):
|
||||
Integer, ForeignKey("ap_activities.id", ondelete="CASCADE"), nullable=False,
|
||||
)
|
||||
inbox_url: Mapped[str] = mapped_column(String(512), nullable=False)
|
||||
app_domain: Mapped[str] = mapped_column(String(128), nullable=False, server_default="federation")
|
||||
status_code: Mapped[int | None] = mapped_column(Integer, nullable=True)
|
||||
delivered_at: Mapped[datetime] = mapped_column(
|
||||
DateTime(timezone=True), nullable=False, server_default=func.now(),
|
||||
)
|
||||
|
||||
__table_args__ = (
|
||||
UniqueConstraint("activity_id", "inbox_url", name="uq_delivery_activity_inbox"),
|
||||
UniqueConstraint("activity_id", "inbox_url", "app_domain", name="uq_delivery_activity_inbox_domain"),
|
||||
Index("ix_ap_delivery_activity", "activity_id"),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user