mirror of
https://github.com/usbharu/Hideout.git
synced 2026-08-06 04:54:38 +00:00
Apply suggestions from code review
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@@ -56,7 +56,6 @@ class APNoteServiceImpl(
|
||||
|
||||
) : APNoteService {
|
||||
|
||||
|
||||
private val logger = LoggerFactory.getLogger(APNoteServiceImpl::class.java)
|
||||
|
||||
override suspend fun fetchNote(url: String, targetActor: String?): Note {
|
||||
@@ -144,7 +143,6 @@ class APNoteServiceImpl(
|
||||
override suspend fun fetchNote(note: Note, targetActor: String?): Note =
|
||||
saveIfMissing(note, targetActor, note.id ?: throw IllegalArgumentException("note.id is null"))
|
||||
|
||||
|
||||
companion object {
|
||||
const val public: String = "https://www.w3.org/ns/activitystreams#Public"
|
||||
}
|
||||
|
||||
-1
@@ -20,7 +20,6 @@ class ApNoteJobServiceImpl(
|
||||
private val transaction: Transaction
|
||||
) : ApNoteJobService {
|
||||
override suspend fun createNoteJob(props: JobProps<DeliverPostJob>) {
|
||||
|
||||
val actor = props[DeliverPostJob.actor]
|
||||
val create = objectMapper.readValue<Create>(props[DeliverPostJob.create])
|
||||
transaction.transaction {
|
||||
|
||||
@@ -22,7 +22,6 @@ class PostServiceImpl(
|
||||
private val apSendCreateService: ApSendCreateService
|
||||
) : PostService {
|
||||
|
||||
|
||||
override suspend fun createLocal(post: PostCreateDto): Post {
|
||||
logger.info("START Create Local Post user: {}, media: {}", post.userId, post.mediaIds.size)
|
||||
val create = internalCreate(post, true)
|
||||
@@ -38,7 +37,6 @@ class PostServiceImpl(
|
||||
return createdPost
|
||||
}
|
||||
|
||||
|
||||
private suspend fun internalCreate(post: Post, isLocal: Boolean): Post {
|
||||
val save = try {
|
||||
postRepository.save(post)
|
||||
|
||||
Reference in New Issue
Block a user