mirror of https://github.com/usbharu/Hideout.git
fix: 投稿の配送処理のtoが間違っていたのを修正
This commit is contained in:
parent
95f3da5bb6
commit
33015817fd
|
@ -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]
|
||||||
)
|
)
|
||||||
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 {
|
transaction.transaction {
|
||||||
val signer = userQueryService.findByUrl(actor)
|
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(
|
apRequestService.apPost(
|
||||||
inbox,
|
inbox,
|
||||||
Create(
|
Create(
|
||||||
|
|
Loading…
Reference in New Issue