fix: 投稿の配送処理のtoが間違っていたのを修正

This commit is contained in:
usbharu 2023-10-31 17:32:04 +09:00
parent 95f3da5bb6
commit 33015817fd
1 changed files with 12 additions and 12 deletions

View File

@ -33,21 +33,21 @@ class ApNoteJobServiceImpl(
objectMapper.readValue<List<dev.usbharu.hideout.domain.model.hideout.entity.Media>>(
props[DeliverPostJob.media]
)
val note = Note(
name = "Note",
id = postEntity.url,
attributedTo = actor,
content = postEntity.text,
published = Instant.ofEpochMilli(postEntity.createdAt).toString(),
to = listOf(APNoteServiceImpl.public, "$actor/follower"),
attachment = mediaList.map { Document(mediaType = "image/jpeg", url = it.url) }
)
val inbox = props[DeliverPostJob.inbox]
logger.debug("createNoteJob: actor={}, note={}, inbox={}", actor, postEntity, inbox)
transaction.transaction {
val signer = userQueryService.findByUrl(actor)
val note = Note(
name = "Note",
id = postEntity.url,
attributedTo = actor,
content = postEntity.text,
published = Instant.ofEpochMilli(postEntity.createdAt).toString(),
to = listOfNotNull(APNoteServiceImpl.public, signer.followers),
attachment = mediaList.map { Document(mediaType = "image/jpeg", url = it.url) }
)
val inbox = props[DeliverPostJob.inbox]
logger.debug("createNoteJob: actor={}, note={}, inbox={}", actor, postEntity, inbox)
apRequestService.apPost(
inbox,
Create(