Add ActivityPub reply ingestion #104

Closed
opened 2026-06-05 07:58:53 -05:00 by erik · 2 comments
Owner

Goal

Store incoming ActivityPub replies to local published posts as moderated comments in the template site using the Fedify inbox foundation.

Requirements

  • Handle incoming Create activities containing reply objects through the existing Fedify federation route setup.
  • Avoid adding custom raw inbox routes outside Fedify for ActivityPub protocol handling.
  • Accept replies only when they target local published post URLs.
  • Extract author profile URL, display name, handle, published timestamp, content HTML, and content text where available.
  • Sanitize or normalize remote reply content before storing it.
  • Store replies as comments with pending moderation by default.
  • Deduplicate replies by stable activity or object URL.
  • Ignore replies targeting unknown, draft, or non-local posts.
  • Preserve existing comments API response shapes and moderation flows.
  • Add tests for valid reply ingestion, duplicate handling, unknown target handling, draft target handling, sanitization, and comment API visibility.

Acceptance criteria

  • Incoming reply Create handled through Fedify for a local published post creates a pending comment.
  • Duplicate reply activities do not create duplicate comments.
  • Replies to unknown, draft, or non-local posts are ignored or rejected safely.
  • Stored reply content is sanitized/normalized before display.
  • Existing comment moderation APIs can approve or hide ingested replies.
  • Tests cover ingestion, deduplication, target validation, and moderation visibility.
  • No duplicate hand-rolled ActivityPub inbox routes are added outside the Fedify route setup.
  • Relevant lint/test checks pass.

Dependencies

  • task-e025ad45
  • task-2775b988
## Goal Store incoming ActivityPub replies to local published posts as moderated comments in the template site using the Fedify inbox foundation. ## Requirements - Handle incoming `Create` activities containing reply objects through the existing Fedify federation route setup. - Avoid adding custom raw inbox routes outside Fedify for ActivityPub protocol handling. - Accept replies only when they target local published post URLs. - Extract author profile URL, display name, handle, published timestamp, content HTML, and content text where available. - Sanitize or normalize remote reply content before storing it. - Store replies as comments with pending moderation by default. - Deduplicate replies by stable activity or object URL. - Ignore replies targeting unknown, draft, or non-local posts. - Preserve existing comments API response shapes and moderation flows. - Add tests for valid reply ingestion, duplicate handling, unknown target handling, draft target handling, sanitization, and comment API visibility. ## Acceptance criteria - [ ] Incoming reply `Create` handled through Fedify for a local published post creates a pending comment. - [ ] Duplicate reply activities do not create duplicate comments. - [ ] Replies to unknown, draft, or non-local posts are ignored or rejected safely. - [ ] Stored reply content is sanitized/normalized before display. - [ ] Existing comment moderation APIs can approve or hide ingested replies. - [ ] Tests cover ingestion, deduplication, target validation, and moderation visibility. - [ ] No duplicate hand-rolled ActivityPub inbox routes are added outside the Fedify route setup. - [ ] Relevant lint/test checks pass. ## Dependencies - task-e025ad45 - task-2775b988
Author
Owner

Synced from todu comment by @todu on 2026-06-06T04:16:40.401Z

Review update

  • PR: #119 open, CI green.
  • Result: approved.
  • Criteria: 8/8 met, 0 blocking issues, 0 warnings.
  • Follow-up: stop at human merge approval gate.
_Synced from todu comment by @todu on 2026-06-06T04:16:40.401Z_ ### Review update - PR: #119 open, CI green. - Result: approved. - Criteria: 8/8 met, 0 blocking issues, 0 warnings. - Follow-up: stop at human merge approval gate.
erik 2026-06-05 23:24:28 -05:00
Author
Owner

Synced from todu comment by @todu on 2026-06-06T04:20:29.018Z

Completed

Close gate passed. All acceptance criteria are met with code/test evidence.

Evidence summary:

  • Fedify inbox Create handling stores valid remote replies to local published posts as pending comments.
  • Duplicate reply activity/object URLs do not create duplicate comments.
  • Replies to unknown, draft, or non-local posts are ignored safely.
  • Remote reply content is sanitized/normalized before storage.
  • Existing comment moderation APIs approve and hide ingested replies.
  • Tests cover ingestion, deduplication, target validation, sanitization, and moderation API visibility.
  • No duplicate raw ActivityPub inbox routes were added.
  • PR #119 had green CI and is merged.
_Synced from todu comment by @todu on 2026-06-06T04:20:29.018Z_ ### Completed Close gate passed. All acceptance criteria are met with code/test evidence. Evidence summary: - Fedify inbox `Create` handling stores valid remote replies to local published posts as pending comments. - Duplicate reply activity/object URLs do not create duplicate comments. - Replies to unknown, draft, or non-local posts are ignored safely. - Remote reply content is sanitized/normalized before storage. - Existing comment moderation APIs approve and hide ingested replies. - Tests cover ingestion, deduplication, target validation, sanitization, and moderation API visibility. - No duplicate raw ActivityPub inbox routes were added. - PR #119 had green CI and is merged.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
erik/slugkit#104
No description provided.