Commit Graph

159 Commits

Author SHA1 Message Date
Christomatt 8eee3b19c6 feat(users): Add remote placeholder refresh logic to user profile endpoint
- Add detection for remote placeholder users (handles containing @)
- Implement fresh data fetching from remote when placeholder is detected
- Refactor conditional logic to treat stale placeholders as missing users
- Only return 404 error if user is genuinely not found, not for refresh attempts
- Improves data freshness for federated user profiles by re-fetching from source
2026-01-26 12:10:46 +01:00
Christomatt 2fdcfce804 feat(db): Add favicon support and improve remote followers uniqueness constraint
- Add favicon_url column to nodes table for storing node instance favicons
- Replace actor_url unique constraint with composite unique index on (user_id, actor_url) in remote_followers table
- Update database schema and migration files to reflect new constraints
- Improve data integrity by ensuring remote followers are unique per user and actor combination
2026-01-26 11:20:32 +01:00
Christomatt a15933596c fix(swarm): Add error handling for notification creation in interactions
- Wrap notification creation in try-catch blocks for follow interactions
- Wrap notification creation in try-catch blocks for like interactions
- Wrap notification creation in try-catch blocks for repost interactions
- Add console logging for successful notification creation with interaction details
- Add error logging for failed notification creation to aid in debugging
- Prevent interaction failures from cascading due to notification errors
2026-01-26 11:12:32 +01:00
Christomatt 1c235e2027 feat(notifications): Add bot owner notifications for interactions
- Create new botOwnerNotify module with notifyBotOwnerForPost and notifyBotOwnerForFollow functions
- Add bot owner notifications to local post interactions (likes, reposts)
- Add bot owner notifications to swarm post interactions (likes, reposts, mentions)
- Add bot owner notifications to follow interactions (local and swarm)
- Implement mention notification creation for local mentions in post creation
- Notify bot owners when their bots receive interactions from other users
- Ensure bot owners are alerted to engagement on their bot accounts across federated network
2026-01-26 10:57:32 +01:00
Christomatt 5efd3adbfd feat(swarm): Add federated followers and following endpoints
- Create new swarm endpoints for fetching user followers list at /api/swarm/users/[handle]/followers
- Create new swarm endpoints for fetching user following list at /api/swarm/users/[handle]/following
- Add SwarmFollowerUser and SwarmFollowingUser interfaces for federated user data
- Implement local and remote follower/following aggregation in swarm endpoints
- Update local followers endpoint to fetch data from remote swarm nodes
- Update local following endpoint to fetch data from remote swarm nodes
- Add error handling and database availability checks for all endpoints
- Include node domain and timestamp metadata in swarm responses
- Support pagination with configurable limit parameter (max 100)
- Enable cross-node follower/following visibility for federated social graph
2026-01-26 10:43:08 +01:00
Christomatt fce820d59a feat(users): Add bot owner tracking to user profiles
- Add botOwnerHandle field to SwarmUserProfile interface to track bot ownership
- Include botOwner relationship in swarm user profile queries for bot users
- Populate botOwnerHandle in swarm profile responses when user is a bot
- Build botOwner object in local user profile endpoint when fetching remote bot profiles
- Include botOwner data in user profile responses for better bot attribution
- Enables tracking and displaying which user owns each bot across federated instances
2026-01-26 10:30:42 +01:00
Christomatt 728dda6b52 feat(timeline,background): Add live remote post fetching and background sync
- Implement live post fetching from followed remote users with parallel requests and timeouts
- Add remote-sync background task to periodically cache posts from followed remote users
- Optimize swarm node detection and prioritize swarm API over ActivityPub for faster responses
- Add timeout wrapper (5s per node) to prevent slow remote nodes from blocking timeline requests
- Enhance scheduler to support background sync tasks with configurable intervals
- Transform remote posts to match local format with proper media and author metadata
- Improve error handling and logging for remote user post fetching
- Replace cached-only approach with hybrid live/cached strategy for fresher content
2026-01-26 10:14:07 +01:00
Christomatt e98221e81a feat(bots): Consolidate bot posting into autonomous module and improve caching
- Remove scheduled posting logic and consolidate all bot posting into autonomous module
- Simplify cron endpoint to only call processAllAutonomousBots with cleaner response format
- Add background post caching for swarm follow operations via cacheSwarmUserPosts
- Update background scheduler to remove scheduled posting references and streamline logging
- Improve autonomous module documentation to clarify schedule-based posting with optional sources
- Enhance error tracking and reporting across bot task execution
- Reduce code duplication by eliminating separate scheduled/autonomous processing paths
2026-01-26 09:39:12 +01:00
root 387314581f Initial commit 2026-01-26 08:34:48 +01:00