When merging duplicate feeds with redirects, Follow relationships
can generate UNIQUE constraint errors if the relationship already
exists between the same profiles.
This fix:
- Iterates Follow relationships individually
- Checks for existing relationships before updating
- Deletes duplicates safely
- Adds comprehensive error handling
Similar approach to PollVote fix.
Resolves issue with feeds like haiverin.scot redirect.
Signed-off-by: Andros Fenollosa <hi@andros.dev>
This commit implements automatic cleanup of feeds that haven't been successfully fetched in 3 days.
Changes:
- Add last_successful_fetch field to Feed model to track when feeds are successfully fetched (HTTP 200)
- Update parse_org_social() and validate_org_social_feed() to record successful fetches
- Add new periodic task cleanup_stale_feeds() that runs every 3 days and deletes inactive feeds
- Add comprehensive test suite (9 tests, all passing)
- Migration safely handles existing feeds by setting initial last_successful_fetch to protect them
Safety features:
- Feeds with last_successful_fetch = NULL are never deleted (protects legacy feeds)
- Only feeds older than 3 days are deleted
- Extensive logging of cleanup operations
- Initial migration sets timestamp for all existing feeds to prevent accidental deletion
🤖 Generated with [Claude Code](https://claude.com/claude-code)
This commit introduces three new REST API endpoints to the Org Social Relay:
1. /reactions/ - Retrieves reactions (posts with mood emojis) to a user's posts
2. /replies-to/ - Gets direct replies to a user's posts (excluding reactions and poll votes)
3. /notifications/ - Unified endpoint combining mentions, reactions, and replies with optional type filtering
Implementation details:
- All endpoints follow the existing API pattern with caching, validation, and error handling
- Comprehensive test suites with 35 passing tests
- Updated README with full documentation and examples
- Integrated into Django settings and URL configuration
- Code formatted with Ruff
🤖 Generated with [Claude Code](https://claude.com/claude-code)
- Changed tag search from substring match to exact word match
- Tags like 'emacs' now won't match 'notemacs' or 'emacs-lisp'
- Search remains case insensitive
- Added tests for exact word matching and case insensitivity
- Add group field to Post model
- Store group name directly in posts during feed scanning
- Filter group messages by post.group field
- Remove GroupMember dependency from views
- Update tests to use direct group field
- Simpler and more efficient approach
🤖 Generated with [Claude Code](https://claude.com/claude-code)
- Updated parser to accept #+title:, #+nick:, #+description: (lowercase)
- Added re.IGNORECASE flag to all metadata parsing regex patterns
- Fixes validation issues with feeds using lowercase keywords
- Enables registration of feeds like codeberg.org that use lowercase format
- Changed /polls/ to return simple URL array instead of full objects
- Changed /polls/votes/ to use 'post' parameter instead of 'feed' and 'poll_id'
- Updated /polls/votes/ response format to match README structure
- Updated all tests to match new API format
- Added proper URL parsing and validation for post parameter
- All 16 tests passing
API changes:
- GET /polls/ -> returns array of poll URLs
- GET /polls/votes/?post=<url> -> returns vote data grouped by option