♻️ Refactored fediverse relationships

This commit is contained in:
2025-12-31 18:29:35 +08:00
parent 2b6cf503a5
commit caf5468dad
9 changed files with 2437 additions and 42 deletions

View File

@@ -191,7 +191,7 @@ public class ActivityPubController(
var relationshipsQuery = db.FediverseRelationships
.Include(r => r.Actor)
.Where(r => r.Actor.PublisherId == publisher.Id && r.IsFollowedBy);
.Where(r => r.TargetActor.PublisherId == publisher.Id && r.State == RelationshipState.Accepted);
var totalItems = await relationshipsQuery.CountAsync();
@@ -257,7 +257,7 @@ public class ActivityPubController(
var relationshipsQuery = db.FediverseRelationships
.Include(r => r.TargetActor)
.Where(r => r.Actor.PublisherId == publisher.Id && r.IsFollowing);
.Where(r => r.Actor.PublisherId == publisher.Id && r.State == RelationshipState.Accepted);
var totalItems = await relationshipsQuery.CountAsync();