Add fediverse social tables, protocols, and implementations
6 new ORM models (remote actors, following, remote posts, local posts, interactions, notifications), 20 new FederationService methods with SQL implementations and stubs, WebFinger client, and Alembic migration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -227,5 +227,65 @@ class StubFederationService:
|
||||
async def remove_follower(self, session, username, follower_acct):
|
||||
return False
|
||||
|
||||
async def get_or_fetch_remote_actor(self, session, actor_url):
|
||||
return None
|
||||
|
||||
async def search_remote_actor(self, session, acct):
|
||||
return None
|
||||
|
||||
async def send_follow(self, session, local_username, remote_actor_url):
|
||||
raise RuntimeError("FederationService not available")
|
||||
|
||||
async def get_following(self, session, username, page=1, per_page=20):
|
||||
return [], 0
|
||||
|
||||
async def accept_follow_response(self, session, local_username, remote_actor_url):
|
||||
pass
|
||||
|
||||
async def unfollow(self, session, local_username, remote_actor_url):
|
||||
pass
|
||||
|
||||
async def ingest_remote_post(self, session, remote_actor_id, activity_json, object_json):
|
||||
pass
|
||||
|
||||
async def delete_remote_post(self, session, object_id):
|
||||
pass
|
||||
|
||||
async def get_remote_post(self, session, object_id):
|
||||
return None
|
||||
|
||||
async def get_home_timeline(self, session, actor_profile_id, before=None, limit=20):
|
||||
return []
|
||||
|
||||
async def get_public_timeline(self, session, before=None, limit=20):
|
||||
return []
|
||||
|
||||
async def create_local_post(self, session, actor_profile_id, content, visibility="public", in_reply_to=None):
|
||||
raise RuntimeError("FederationService not available")
|
||||
|
||||
async def delete_local_post(self, session, actor_profile_id, post_id):
|
||||
raise RuntimeError("FederationService not available")
|
||||
|
||||
async def like_post(self, session, actor_profile_id, object_id, author_inbox):
|
||||
pass
|
||||
|
||||
async def unlike_post(self, session, actor_profile_id, object_id, author_inbox):
|
||||
pass
|
||||
|
||||
async def boost_post(self, session, actor_profile_id, object_id, author_inbox):
|
||||
pass
|
||||
|
||||
async def unboost_post(self, session, actor_profile_id, object_id, author_inbox):
|
||||
pass
|
||||
|
||||
async def get_notifications(self, session, actor_profile_id, before=None, limit=20):
|
||||
return []
|
||||
|
||||
async def unread_notification_count(self, session, actor_profile_id):
|
||||
return 0
|
||||
|
||||
async def mark_notifications_read(self, session, actor_profile_id):
|
||||
pass
|
||||
|
||||
async def get_stats(self, session):
|
||||
return {"actors": 0, "activities": 0, "followers": 0}
|
||||
|
||||
Reference in New Issue
Block a user