Working webmentions

This commit is contained in:
Thomas Sileo 2022-07-10 16:04:37 +02:00
parent 229feb23db
commit 1b3c76ee2f
3 changed files with 19 additions and 3 deletions

View file

@ -104,7 +104,7 @@ def _send_actor_update_if_needed(db_session: Session) -> None:
for rcp in {
follower.actor.shared_inbox_url or follower.actor.inbox_url
for follower in followers
} + {
} | {
row.recipient
for row in db_session.execute(
select(func.distinct(models.OutgoingActivity.recipient).label("recipient"))
@ -124,7 +124,7 @@ def _send_actor_update_if_needed(db_session: Session) -> None:
async def new_outgoing_activity(
db_session: AsyncSession,
recipient: str,
outbox_object_id: int | None,
outbox_object_id: int | None = None,
inbox_object_id: int | None = None,
webmention_target: str | None = None,
) -> models.OutgoingActivity: