Add ActivityPub remote following #121

Merged
erik merged 1 commit from feat/task-d9f28859-activitypub-remote-following into main 2026-06-06 08:03:02 -05:00
Owner

Summary

  • add real WebFinger/direct actor URL resolution for /api/v1/following
  • deliver Follow and Undo Follow through Fedify Context.sendActivity via sendActivityPubActivity
  • handle inbound signed Fedify Accept/Reject responses for stored follows
  • add unfollowed state support and OpenAPI updates

Verification

  • make check
  • ./scripts/pre-pr.sh

Task: #task-d9f28859

## Summary - add real WebFinger/direct actor URL resolution for `/api/v1/following` - deliver Follow and Undo Follow through Fedify `Context.sendActivity` via `sendActivityPubActivity` - handle inbound signed Fedify `Accept`/`Reject` responses for stored follows - add `unfollowed` state support and OpenAPI updates ## Verification - [x] `make check` - [x] `./scripts/pre-pr.sh` Task: #task-d9f28859
feat: add ActivityPub remote following
All checks were successful
CI / build-lint-test (pull_request) Successful in 45s
61051f1213
Task: #task-d9f28859
erik force-pushed feat/task-d9f28859-activitypub-remote-following from 61051f1213
All checks were successful
CI / build-lint-test (pull_request) Successful in 45s
to 9b15380915
All checks were successful
CI / build-lint-test (pull_request) Successful in 45s
2026-06-06 08:00:52 -05:00
Compare
Author
Owner

PR Review

Summary

  • Reviewed PR #121 for task-d9f28859 against the remote ActivityPub following requirements.
  • The implementation resolves remote actors via WebFinger or direct actor URL, validates safe remote URLs, persists following/contact/account data, and delivers Follow/Undo Follow through the existing Fedify sendActivityPubActivity helper.
  • Incoming signed Fedify Accept and Reject inbox activities update stored following state.
  • CI and local gates are green.

Acceptance criteria

  • A valid handle can be resolved to a remote ActivityPub actor. — met via WebFinger lookup, safe actor fetch, and Fedify vocab parsing in template/site/src/following/following.ts, covered by following API tests.
  • Following a remote actor stores a pending following record and queues Fedify delivery of Follow through the delivery helper. — met in template/site/src/api/routes/following.ts and template/site/src/federation/following.ts, covered by queue assertions.
  • Incoming Accept handled through Fedify updates the following record to accepted. — met by handleActivityPubFollowAccept and signed inbox tests.
  • Incoming Reject handled through Fedify updates the following record to rejected. — met by handleActivityPubFollowReject and signed inbox tests.
  • Unfollow/cancel queues Fedify delivery of Undo Follow and updates local state. — met by API unfollow flow, pending cancellation, accepted unfollowed state, and queue assertions.
  • Unsafe remote URLs are rejected. — met with HTTPS/local/private URL validation before fetch and test coverage.
  • Generic /api/v1/following routes return the expected following state. — met with preserved list/create/unfollow response coverage and OpenAPI status enum updates.
  • No duplicate hand-rolled ActivityPub inbox routes are added outside the Fedify route setup. — met; PR only adds Fedify inbox listeners in template/site/src/federation/routes.ts.
  • Relevant tests and checks pass. — met: make check, ./scripts/pre-pr.sh, and Forgejo CI task #162 passed.

Blocking issues

  • None.

Warnings

  • None.

Verdict

Approved. Stop at the human merge approval gate.

PR Review Worker Result

  • pr: open
  • review: approved
  • pr_comment: posted
  • task_comment: posted
  • blocking_issues: 0
  • warnings: 0
  • criteria_total: 9
  • criteria_met: 9
  • criteria_missing: 0
## PR Review ### Summary - Reviewed PR #121 for `task-d9f28859` against the remote ActivityPub following requirements. - The implementation resolves remote actors via WebFinger or direct actor URL, validates safe remote URLs, persists following/contact/account data, and delivers Follow/Undo Follow through the existing Fedify `sendActivityPubActivity` helper. - Incoming signed Fedify `Accept` and `Reject` inbox activities update stored following state. - CI and local gates are green. ### Acceptance criteria - [x] A valid handle can be resolved to a remote ActivityPub actor. — met via WebFinger lookup, safe actor fetch, and Fedify vocab parsing in `template/site/src/following/following.ts`, covered by following API tests. - [x] Following a remote actor stores a pending following record and queues Fedify delivery of `Follow` through the delivery helper. — met in `template/site/src/api/routes/following.ts` and `template/site/src/federation/following.ts`, covered by queue assertions. - [x] Incoming `Accept` handled through Fedify updates the following record to accepted. — met by `handleActivityPubFollowAccept` and signed inbox tests. - [x] Incoming `Reject` handled through Fedify updates the following record to rejected. — met by `handleActivityPubFollowReject` and signed inbox tests. - [x] Unfollow/cancel queues Fedify delivery of `Undo Follow` and updates local state. — met by API unfollow flow, pending cancellation, accepted unfollowed state, and queue assertions. - [x] Unsafe remote URLs are rejected. — met with HTTPS/local/private URL validation before fetch and test coverage. - [x] Generic `/api/v1/following` routes return the expected following state. — met with preserved list/create/unfollow response coverage and OpenAPI status enum updates. - [x] No duplicate hand-rolled ActivityPub inbox routes are added outside the Fedify route setup. — met; PR only adds Fedify inbox listeners in `template/site/src/federation/routes.ts`. - [x] Relevant tests and checks pass. — met: `make check`, `./scripts/pre-pr.sh`, and Forgejo CI task #162 passed. ### Blocking issues - None. ### Warnings - None. ### Verdict Approved. Stop at the human merge approval gate. PR Review Worker Result - pr: open - review: approved - pr_comment: posted - task_comment: posted - blocking_issues: 0 - warnings: 0 - criteria_total: 9 - criteria_met: 9 - criteria_missing: 0
erik merged commit 6091ea812e into main 2026-06-06 08:03:02 -05:00
erik deleted branch feat/task-d9f28859-activitypub-remote-following 2026-06-06 08:03:02 -05:00
Sign in to join this conversation.
No description provided.