Closed
Fix domain migration: persist movedTo field for old domain actors#99
Conversation
- Add database migration for alternate domains table - Add database functions for managing alternate domains - Modify webfinger to support multiple domains via Host header - Add helper function to generate IRIs for specific domains - Update actor generation to include alternate domains in alsoKnownAs - Add toApPersonForDomain to generate actors for specific domains - Update serveActivityStreams to use Host header for domain-specific responses - Add CLI command for domain moves (activitypub domainmove) - Implement apDomainMove function to handle domain migrations Co-authored-by: jlelse <8822316+jlelse@users.noreply.github.com>
- Add comprehensive integration test for domain migration - Test verifies both domains are accessible - Test checks webfinger works for both domains - Test validates actor endpoints return domain-specific IRIs - Update README with domain move procedure - Add CLI command documentation for domain moves - Document the complete workflow for domain changes Co-authored-by: jlelse <8822316+jlelse@users.noreply.github.com>
- Remove trailing whitespace from main.go, activityStreams.go, activityPub.go - Address code review feedback Co-authored-by: jlelse <8822316+jlelse@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support for Move activity in domain changes
Add ActivityPub domain migration support for same-instance moves
Feb 3, 2026
Major refactoring based on feedback: - Move alternateDomains from ActivityPub config to Server config (whole GoBlog) - Remove database storage for alternate domains (now config-based) - Update domain move command to work on ALL blogs (no blog parameter) - Add redirect logic for non-AP requests to old domains - Update integration test to follow OLD domain first and verify Move works - Remove remove-alternate-domain CLI command (config-based now) - Update all documentation for new approach Key changes: - server.alternateDomains replaces activityPub.alternateDomains - domainmove command: "domainmove <old> <new>" (no blog param) - Alternate domains work for whole GoBlog, not just ActivityPub - Redirects work correctly with reverse proxy configuration Co-authored-by: jlelse <8822316+jlelse@users.noreply.github.com>
- Fix goBlogAcctOld → goBlogAcctOldWebfinger in test - Address code review feedback Co-authored-by: jlelse <8822316+jlelse@users.noreply.github.com>
Copilot
AI
changed the title
Add ActivityPub domain migration support for same-instance moves
Refactor domain migration to use config-based alternate domains with redirect support
Feb 3, 2026
**Fixed Issues:** 1. apDomainMove now calls setApMovedTo() for each blog 2. Rewrote integration test to match requirements: - Starts GoBlog without alternate domain (old domain only) - Follows old domain account - Stops server, updates config to add alternate domain - Restarts with new domain configuration - Runs domain move and verifies movedTo is set - Verifies follower automatically migrates to new domain **publicHttps:** Already correctly implemented in apIriForDomain **Test Flow:** - Phase 1: Start with OLD domain only - Phase 2: Follow old domain - Phase 3: Stop, update config, restart with new domain + alternate - Phase 4: Run domain move, verify movedTo is set - Phase 5: Verify follower migrated to new domain The test now properly simulates real-world domain migration workflow. Co-authored-by: jlelse <8822316+jlelse@users.noreply.github.com>
- Added setApMovedTo() call in apDomainMove for each blog - movedTo field now properly set to new domain actor IRI - publicHttps already correctly implemented in apIriForDomain Note: Integration test needs rewrite (removed temp files). The test should: 1. Start GoBlog with OLD domain only 2. Follow old domain 3. Stop, update config with alternate domain, restart 4. Run domain move 5. Verify movedTo is set and followers migrate This matches real-world domain migration workflow. Co-authored-by: jlelse <8822316+jlelse@users.noreply.github.com>
Copilot
AI
changed the title
Refactor domain migration to use config-based alternate domains with redirect support
Fix domain migration: persist movedTo field for old domain actors
Feb 3, 2026
Copilot stopped work on behalf of
jlelse due to an error
February 3, 2026 10:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plan: Create Domain Move Integration Test
This will properly test the domain migration workflow.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.