Commit graph

58 commits

Author SHA1 Message Date
Andros Fenollosa
c34a90c9e2 Fixed reaction 2025-11-01 14:42:43 +01:00
Andros Fenollosa
3128327da2
Add FUNDING.yaml file 2025-10-11 11:56:07 +02:00
Andros Fenollosa
27279cff73
Add funding information to FUNDING.md 2025-10-11 11:55:37 +02:00
Andros Fenollosa
4672a14dff Add notification endpoints to root view 2025-10-11 11:21:08 +02:00
Andros Fenollosa
7cdd74f1ee Document automatic feed cleanup in README
Added documentation for the new cleanup_stale_feeds cron job that runs every 3 days.
2025-10-11 11:05:26 +02:00
Andros Fenollosa
fd571fc856 Add automatic cleanup of stale feeds
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)
2025-10-11 10:53:29 +02:00
Andros Fenollosa
8720109867 Add new notification endpoints: reactions, replies-to, and notifications
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)
2025-10-11 10:36:47 +02:00
Andros Fenollosa
7ce1e1f862 Fix tag search to match exact words only
- 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
2025-10-10 14:59:28 +02:00
Andros Fenollosa
c861964225 Updated name groups with spaces 2025-10-10 07:54:55 +02:00
Andros Fenollosa
e7975920fb Format code with ruff 2025-10-09 19:21:33 +02:00
Andros Fenollosa
453d770e7e Implement group filtering by post field instead of membership
- 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)
2025-10-09 19:13:22 +02:00
Andros Fenollosa
a3fe92f67b Deleted join group 2025-10-09 16:23:51 +02:00
Andros Fenollosa
41f7391199 Add moods to parent post in replies endpoint 2025-10-08 11:16:14 +02:00
Andros Fenollosa
c16c09ea4e Fixed headers 2025-10-02 10:25:47 +02:00
Andros Fenollosa
f41b6157df Updated crons 2025-09-30 12:13:02 +02:00
Andros Fenollosa
730c222651 Added moods 2025-09-25 08:05:30 +02:00
Andros Fenollosa
0ebae9e8b2 Updated HATEOUS 2025-09-23 18:37:55 +02:00
Andros Fenollosa
95c07b00b9 Update 2025-09-23 18:28:48 +02:00
Andros Fenollosa
e77320b1e0 Updated endpoints 2025-09-23 16:53:11 +02:00
Andros Fenollosa
7416f250c3 Removed old code 2025-09-23 16:30:48 +02:00
Andros Fenollosa
0dba03421c Updated 2025-09-22 19:33:14 +02:00
Andros Fenollosa
38efcd8339 Added groups 2025-09-22 16:51:18 +02:00
Andros Fenollosa
8324812592 Updated 2025-09-22 14:53:12 +02:00
Andros Fenollosa
aad211c9d2 Fixed format 2025-09-22 14:52:46 +02:00
Andros Fenollosa
f598b154f4
Update polls endpoint status from to 2025-09-22 12:18:08 +02:00
Andros Fenollosa
48d091bbd7
Update README.md 2025-09-22 12:17:36 +02:00
Andros Fenollosa
15bc89a678
Update diagram.mmd 2025-09-22 12:11:37 +02:00
Andros Fenollosa
e1b4a0d12f Make Org Social feed parsing case-insensitive
- 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
2025-09-21 12:26:52 +02:00
Andros Fenollosa
d6230196bb Fix polls endpoints to match README specification
- 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
2025-09-21 12:17:40 +02:00
Andros Fenollosa
37db9b979d Show all polls (active and expired) in GET /polls/ endpoint
- Modified _get_all_polls() to return both active and expired polls
- Added is_active field to indicate poll status
- Updated test to reflect new behavior
- Polls are ordered by creation date (newest first)
2025-09-21 12:05:41 +02:00
Andros Fenollosa
d1e1f1d784 Add polls endpoints functionality
Implemented comprehensive polls API endpoints for Org Social Relay:

- GET /polls/ - List all active polls in the system
- GET /polls/?feed=<url> - Get polls for a specific feed
- GET /polls/?voter=<url> - Get votes cast by a specific voter
- GET /polls/votes/?feed=<url>&poll_id=<id> - Get votes for a specific poll

Features:
- Complete API endpoints with proper error handling
- Comprehensive test suite with 15 test cases
- Caching for improved performance
- Response format compliance with existing API patterns
- Support for filtering active vs expired polls
- Vote counting and aggregation
- Query parameter validation

Technical details:
- Created new Django app 'polls' in app/polls/
- Added polls app to Django settings and URL configuration
- Uses existing poll models from feeds app (PollOption, PollVote)
- Follows established patterns for API responses and error handling
- All tests passing with proper Given/When/Then structure
2025-09-21 11:52:25 +02:00
Andros Fenollosa
3ba37002c9 Added polls 2025-09-20 20:05:16 +02:00
Andros Fenollosa
9ffacbb7d1 Fixed cache 2025-09-20 19:16:04 +02:00
Andros Fenollosa
b27bcbe9e1 Updated mentions 2025-09-20 10:18:17 +02:00
Andros Fenollosa
109ff29854 Added mentions and tasks 2025-09-19 16:09:27 +02:00
Andros Fenollosa
7cea5a2a7a Added table 2025-09-17 09:12:27 +02:00
Andros Fenollosa
2f80b8f638 Updated Redis connection and README 2025-09-17 09:09:35 +02:00
Andros Fenollosa
db6243c785 Fixed crontab 2025-09-17 08:56:10 +02:00
Andros Fenollosa
f740b08671 Minor fix 2025-09-17 08:50:54 +02:00
Andros Fenollosa
74a5bd3ce0 Fixed routers 2025-09-17 08:47:28 +02:00
Andros Fenollosa
7da5d50ab1 Added cache 2025-09-16 16:12:03 +02:00
Andros Fenollosa
cb74e9d140 Remove uv 2025-09-16 16:06:28 +02:00
Andros Fenollosa
1d5918aa60 Minor bug 2025-09-16 15:58:12 +02:00
Andros Fenollosa
fdfb09da5a Added uv 2025-09-16 15:52:23 +02:00
Andros Fenollosa
4b7e286d96 Fixed Redis sleep 2025-09-16 15:50:16 +02:00
Andros Fenollosa
32d448f517 Upload 2025-09-16 15:46:32 +02:00
Andros Fenollosa
e62cfdd0ac Reverse proxy 2025-09-16 15:43:45 +02:00
Andros Fenollosa
91957efb59 Fix minor bug 2025-09-16 15:41:57 +02:00
Andros Fenollosa
4d274ba834 Added envExample 2025-09-16 15:39:12 +02:00
Andros Fenollosa
b9c84a25ae Feeds endpoints 2025-09-16 15:28:21 +02:00