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