♻️ Refactor the follow activitypub process

This commit is contained in:
2025-12-31 22:52:31 +08:00
parent add9fa49e5
commit c11b30d0bb
2 changed files with 86 additions and 101 deletions

View File

@@ -29,16 +29,12 @@ public class ActivityPubDeliveryService(
}
public async Task<bool> SendAcceptActivityAsync(
Guid publisherId,
SnFediverseActor actor,
string followerActorUri,
string followActivityId
)
{
var publisher = await db.Publishers.FindAsync(publisherId);
if (publisher == null)
return false;
var actorUrl = $"https://{Domain}/activitypub/actors/{publisher.Name}";
var actorUrl = actor.Uri;
var followerActor = await db.FediverseActors
.FirstOrDefaultAsync(a => a.Uri == followerActorUri);