mirror of https://github.com/usbharu/Hideout.git
fix: 返信が無視されていたのを修正
This commit is contained in:
parent
032342262c
commit
0b63f95c17
|
@ -65,7 +65,9 @@ class PostServiceImpl(
|
|||
createdAt = Instant.now().toEpochMilli(),
|
||||
visibility = post.visibility,
|
||||
url = "${user.url}/posts/$id",
|
||||
mediaIds = post.mediaIds
|
||||
mediaIds = post.mediaIds,
|
||||
replyId = post.repolyId,
|
||||
repostId = post.repostId,
|
||||
)
|
||||
return internalCreate(createPost, isLocal)
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ import dev.usbharu.hideout.mastodon.interfaces.api.status.StatusesRequest
|
|||
import dev.usbharu.hideout.mastodon.interfaces.api.status.toPostVisibility
|
||||
import dev.usbharu.hideout.mastodon.interfaces.api.status.toStatusVisibility
|
||||
import dev.usbharu.hideout.mastodon.service.account.AccountService
|
||||
import org.slf4j.LoggerFactory
|
||||
import org.springframework.stereotype.Service
|
||||
import java.time.Instant
|
||||
|
||||
|
@ -38,12 +39,14 @@ class StatsesApiServiceImpl(
|
|||
statusesRequest: StatusesRequest,
|
||||
userId: Long
|
||||
): Status = transaction.transaction {
|
||||
logger.debug("START create post by mastodon api. {}", statusesRequest)
|
||||
|
||||
val post = postService.createLocal(
|
||||
PostCreateDto(
|
||||
text = statusesRequest.status.orEmpty(),
|
||||
overview = statusesRequest.spoiler_text,
|
||||
visibility = statusesRequest.visibility.toPostVisibility(),
|
||||
repolyId = statusesRequest.in_reply_to_id?.toLongOrNull(),
|
||||
repolyId = statusesRequest.in_reply_to_id?.toLong(),
|
||||
userId = userId,
|
||||
mediaIds = statusesRequest.media_ids.map { it.toLong() }
|
||||
)
|
||||
|
@ -91,4 +94,8 @@ class StatsesApiServiceImpl(
|
|||
editedAt = null,
|
||||
)
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val logger = LoggerFactory.getLogger(StatusesApiService::class.java)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue