🐛 Fix accept follow request in AP
This commit is contained in:
@@ -163,8 +163,7 @@ public class ActivityPubActivityHandler(
|
|||||||
|
|
||||||
await deliveryService.SendAcceptActivityAsync(
|
await deliveryService.SendAcceptActivityAsync(
|
||||||
targetActor,
|
targetActor,
|
||||||
actorUri,
|
actorUri
|
||||||
activityId ?? ""
|
|
||||||
);
|
);
|
||||||
|
|
||||||
logger.LogInformation("Handled follow from {Actor} to {Target}. RelationshipState: Accepted",
|
logger.LogInformation("Handled follow from {Actor} to {Target}. RelationshipState: Accepted",
|
||||||
|
|||||||
@@ -18,8 +18,7 @@ public class ActivityPubDeliveryService(
|
|||||||
|
|
||||||
public async Task<bool> SendAcceptActivityAsync(
|
public async Task<bool> SendAcceptActivityAsync(
|
||||||
SnFediverseActor actor,
|
SnFediverseActor actor,
|
||||||
string followerActorUri,
|
string followerActorUri
|
||||||
string followActivityId
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
var actorUrl = actor.Uri;
|
var actorUrl = actor.Uri;
|
||||||
@@ -38,7 +37,12 @@ public class ActivityPubDeliveryService(
|
|||||||
["id"] = $"{actorUrl}/accepts/{Guid.NewGuid()}",
|
["id"] = $"{actorUrl}/accepts/{Guid.NewGuid()}",
|
||||||
["type"] = "Accept",
|
["type"] = "Accept",
|
||||||
["actor"] = actorUrl,
|
["actor"] = actorUrl,
|
||||||
["object"] = followActivityId
|
["object"] = new Dictionary<string, object>
|
||||||
|
{
|
||||||
|
["type"] = "Follow",
|
||||||
|
["actor"] = followerActorUri,
|
||||||
|
["object"] = actorUrl
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return await EnqueueActivityDeliveryAsync("Accept", activity, actorUrl, followerActor.InboxUri);
|
return await EnqueueActivityDeliveryAsync("Accept", activity, actorUrl, followerActor.InboxUri);
|
||||||
|
|||||||
Reference in New Issue
Block a user