fix: Acceptを送るところでFollowを送っていたので修正

This commit is contained in:
usbharu 2023-04-10 02:49:44 +09:00
parent 6607396e2e
commit 68cc469a43
1 changed files with 6 additions and 1 deletions

View File

@ -1,6 +1,7 @@
package dev.usbharu.hideout.service.activitypub
import com.fasterxml.jackson.module.kotlin.readValue
import dev.usbharu.hideout.ap.Accept
import dev.usbharu.hideout.ap.Follow
import dev.usbharu.hideout.config.Config
import dev.usbharu.hideout.domain.model.ActivityPubResponse
@ -34,7 +35,11 @@ class ActivityPubFollowServiceImpl(
httpClient.postAp(
urlString = person.inbox ?: throw IllegalArgumentException("inbox is not found"),
username = "${props[ReceiveFollowJob.targetActor]}#pubkey",
jsonLd = follow
jsonLd = Accept(
name = "Follow",
`object` = follow,
actor = props[ReceiveFollowJob.targetActor]
)
)
}
}