mirror of https://github.com/usbharu/Hideout.git
refactor: 予約語を使っていたパッケージ名を修正
This commit is contained in:
parent
570895bfdd
commit
5586a61298
|
@ -47,6 +47,9 @@ style:
|
||||||
UseRequire:
|
UseRequire:
|
||||||
active: false
|
active: false
|
||||||
|
|
||||||
|
VarCouldBeVal:
|
||||||
|
ignoreLateinitVar: true
|
||||||
|
|
||||||
complexity:
|
complexity:
|
||||||
CognitiveComplexMethod:
|
CognitiveComplexMethod:
|
||||||
active: true
|
active: true
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package dev.usbharu.hideout.activitypub.domain.model
|
package dev.usbharu.hideout.activitypub.domain.model
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
import dev.usbharu.hideout.activitypub.domain.model.objects.Object
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.`object`.ObjectDeserializer
|
import dev.usbharu.hideout.activitypub.domain.model.objects.ObjectDeserializer
|
||||||
|
|
||||||
open class Accept : Object {
|
open class Accept : Object {
|
||||||
@JsonDeserialize(using = ObjectDeserializer::class)
|
@JsonDeserialize(using = ObjectDeserializer::class)
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package dev.usbharu.hideout.activitypub.domain.model
|
package dev.usbharu.hideout.activitypub.domain.model
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
import dev.usbharu.hideout.activitypub.domain.model.objects.Object
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.`object`.ObjectDeserializer
|
import dev.usbharu.hideout.activitypub.domain.model.objects.ObjectDeserializer
|
||||||
|
|
||||||
open class Create : Object {
|
open class Create : Object {
|
||||||
@JsonDeserialize(using = ObjectDeserializer::class)
|
@JsonDeserialize(using = ObjectDeserializer::class)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package dev.usbharu.hideout.activitypub.domain.model
|
package dev.usbharu.hideout.activitypub.domain.model
|
||||||
|
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
import dev.usbharu.hideout.activitypub.domain.model.objects.Object
|
||||||
|
|
||||||
open class Document : Object {
|
open class Document : Object {
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package dev.usbharu.hideout.activitypub.domain.model
|
package dev.usbharu.hideout.activitypub.domain.model
|
||||||
|
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
import dev.usbharu.hideout.activitypub.domain.model.objects.Object
|
||||||
|
|
||||||
open class Emoji : Object {
|
open class Emoji : Object {
|
||||||
var updated: String? = null
|
var updated: String? = null
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package dev.usbharu.hideout.activitypub.domain.model
|
package dev.usbharu.hideout.activitypub.domain.model
|
||||||
|
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
import dev.usbharu.hideout.activitypub.domain.model.objects.Object
|
||||||
|
|
||||||
open class Follow : Object {
|
open class Follow : Object {
|
||||||
var `object`: String? = null
|
var `object`: String? = null
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package dev.usbharu.hideout.activitypub.domain.model
|
package dev.usbharu.hideout.activitypub.domain.model
|
||||||
|
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
import dev.usbharu.hideout.activitypub.domain.model.objects.Object
|
||||||
|
|
||||||
open class Image : Object {
|
open class Image : Object {
|
||||||
private var mediaType: String? = null
|
private var mediaType: String? = null
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package dev.usbharu.hideout.activitypub.domain.model
|
package dev.usbharu.hideout.activitypub.domain.model
|
||||||
|
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
import dev.usbharu.hideout.activitypub.domain.model.objects.Object
|
||||||
|
|
||||||
open class Key : Object {
|
open class Key : Object {
|
||||||
var owner: String? = null
|
var owner: String? = null
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package dev.usbharu.hideout.activitypub.domain.model
|
package dev.usbharu.hideout.activitypub.domain.model
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
import dev.usbharu.hideout.activitypub.domain.model.objects.Object
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.`object`.ObjectDeserializer
|
import dev.usbharu.hideout.activitypub.domain.model.objects.ObjectDeserializer
|
||||||
|
|
||||||
open class Like : Object {
|
open class Like : Object {
|
||||||
var `object`: String? = null
|
var `object`: String? = null
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package dev.usbharu.hideout.activitypub.domain.model
|
package dev.usbharu.hideout.activitypub.domain.model
|
||||||
|
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
import dev.usbharu.hideout.activitypub.domain.model.objects.Object
|
||||||
|
|
||||||
open class Note : Object {
|
open class Note : Object {
|
||||||
var attributedTo: String? = null
|
var attributedTo: String? = null
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package dev.usbharu.hideout.activitypub.domain.model
|
package dev.usbharu.hideout.activitypub.domain.model
|
||||||
|
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
import dev.usbharu.hideout.activitypub.domain.model.objects.Object
|
||||||
|
|
||||||
open class Person : Object {
|
open class Person : Object {
|
||||||
var preferredUsername: String? = null
|
var preferredUsername: String? = null
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package dev.usbharu.hideout.activitypub.domain.model
|
package dev.usbharu.hideout.activitypub.domain.model
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
import dev.usbharu.hideout.activitypub.domain.model.objects.Object
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.`object`.ObjectDeserializer
|
import dev.usbharu.hideout.activitypub.domain.model.objects.ObjectDeserializer
|
||||||
import java.time.Instant
|
import java.time.Instant
|
||||||
|
|
||||||
open class Undo : Object {
|
open class Undo : Object {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.activitypub.domain.model.`object`
|
package dev.usbharu.hideout.activitypub.domain.model.objects
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.JsonGenerator
|
import com.fasterxml.jackson.core.JsonGenerator
|
||||||
import com.fasterxml.jackson.databind.JsonSerializer
|
import com.fasterxml.jackson.databind.JsonSerializer
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.activitypub.domain.model.`object`
|
package dev.usbharu.hideout.activitypub.domain.model.objects
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.JsonParser
|
import com.fasterxml.jackson.core.JsonParser
|
||||||
import com.fasterxml.jackson.databind.DeserializationContext
|
import com.fasterxml.jackson.databind.DeserializationContext
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.activitypub.domain.model.`object`
|
package dev.usbharu.hideout.activitypub.domain.model.objects
|
||||||
|
|
||||||
open class ObjectValue : Object {
|
open class ObjectValue : Object {
|
||||||
|
|
|
@ -3,7 +3,7 @@ package dev.usbharu.hideout.activitypub.infrastructure.exposedquery
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.Document
|
import dev.usbharu.hideout.activitypub.domain.model.Document
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.Note
|
import dev.usbharu.hideout.activitypub.domain.model.Note
|
||||||
import dev.usbharu.hideout.activitypub.query.NoteQueryService
|
import dev.usbharu.hideout.activitypub.query.NoteQueryService
|
||||||
import dev.usbharu.hideout.activitypub.service.`object`.note.APNoteServiceImpl.Companion.public
|
import dev.usbharu.hideout.activitypub.service.objects.note.APNoteServiceImpl.Companion.public
|
||||||
import dev.usbharu.hideout.application.infrastructure.exposed.QueryMapper
|
import dev.usbharu.hideout.application.infrastructure.exposed.QueryMapper
|
||||||
import dev.usbharu.hideout.core.domain.model.post.Post
|
import dev.usbharu.hideout.core.domain.model.post.Post
|
||||||
import dev.usbharu.hideout.core.domain.model.post.PostRepository
|
import dev.usbharu.hideout.core.domain.model.post.PostRepository
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package dev.usbharu.hideout.activitypub.interfaces.api.actor
|
package dev.usbharu.hideout.activitypub.interfaces.api.actor
|
||||||
|
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.Person
|
import dev.usbharu.hideout.activitypub.domain.model.Person
|
||||||
import dev.usbharu.hideout.activitypub.service.`object`.user.APUserService
|
import dev.usbharu.hideout.activitypub.service.objects.user.APUserService
|
||||||
import org.springframework.http.HttpStatus
|
import org.springframework.http.HttpStatus
|
||||||
import org.springframework.http.ResponseEntity
|
import org.springframework.http.ResponseEntity
|
||||||
import org.springframework.web.bind.annotation.RestController
|
import org.springframework.web.bind.annotation.RestController
|
||||||
|
|
|
@ -25,9 +25,7 @@ sealed class ActivityPubResponse(
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun toString(): String {
|
override fun toString(): String = "ActivityPubResponse(httpStatusCode=$httpStatusCode, contentType=$contentType)"
|
||||||
return "ActivityPubResponse(httpStatusCode=$httpStatusCode, contentType=$contentType)"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class ActivityPubStringResponse(
|
class ActivityPubStringResponse(
|
||||||
|
@ -45,13 +43,9 @@ class ActivityPubStringResponse(
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun hashCode(): Int {
|
override fun hashCode(): Int = message.hashCode()
|
||||||
return message.hashCode()
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun toString(): String {
|
override fun toString(): String = "ActivityPubStringResponse(message='$message') ${super.toString()}"
|
||||||
return "ActivityPubStringResponse(message='$message') ${super.toString()}"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class ActivityPubObjectResponse(
|
class ActivityPubObjectResponse(
|
||||||
|
@ -68,11 +62,7 @@ class ActivityPubObjectResponse(
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun hashCode(): Int {
|
override fun hashCode(): Int = message.hashCode()
|
||||||
return message.hashCode()
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun toString(): String {
|
override fun toString(): String = "ActivityPubObjectResponse(message=$message) ${super.toString()}"
|
||||||
return "ActivityPubObjectResponse(message=$message) ${super.toString()}"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package dev.usbharu.hideout.activitypub.interfaces.api.note
|
package dev.usbharu.hideout.activitypub.interfaces.api.note
|
||||||
|
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.Note
|
import dev.usbharu.hideout.activitypub.domain.model.Note
|
||||||
import dev.usbharu.hideout.activitypub.service.`object`.note.NoteApApiService
|
import dev.usbharu.hideout.activitypub.service.objects.note.NoteApApiService
|
||||||
import dev.usbharu.hideout.core.infrastructure.springframework.httpsignature.HttpSignatureUser
|
import dev.usbharu.hideout.core.infrastructure.springframework.httpsignature.HttpSignatureUser
|
||||||
import org.springframework.http.ResponseEntity
|
import org.springframework.http.ResponseEntity
|
||||||
import org.springframework.security.core.annotation.CurrentSecurityContext
|
import org.springframework.security.core.annotation.CurrentSecurityContext
|
||||||
|
|
|
@ -5,7 +5,7 @@ import dev.usbharu.hideout.activitypub.domain.model.Create
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.Note
|
import dev.usbharu.hideout.activitypub.domain.model.Note
|
||||||
import dev.usbharu.hideout.activitypub.interfaces.api.common.ActivityPubResponse
|
import dev.usbharu.hideout.activitypub.interfaces.api.common.ActivityPubResponse
|
||||||
import dev.usbharu.hideout.activitypub.interfaces.api.common.ActivityPubStringResponse
|
import dev.usbharu.hideout.activitypub.interfaces.api.common.ActivityPubStringResponse
|
||||||
import dev.usbharu.hideout.activitypub.service.`object`.note.APNoteService
|
import dev.usbharu.hideout.activitypub.service.objects.note.APNoteService
|
||||||
import dev.usbharu.hideout.application.external.Transaction
|
import dev.usbharu.hideout.application.external.Transaction
|
||||||
import io.ktor.http.*
|
import io.ktor.http.*
|
||||||
import org.slf4j.LoggerFactory
|
import org.slf4j.LoggerFactory
|
||||||
|
|
|
@ -5,7 +5,7 @@ import com.fasterxml.jackson.module.kotlin.readValue
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.Accept
|
import dev.usbharu.hideout.activitypub.domain.model.Accept
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.Follow
|
import dev.usbharu.hideout.activitypub.domain.model.Follow
|
||||||
import dev.usbharu.hideout.activitypub.service.common.APRequestService
|
import dev.usbharu.hideout.activitypub.service.common.APRequestService
|
||||||
import dev.usbharu.hideout.activitypub.service.`object`.user.APUserService
|
import dev.usbharu.hideout.activitypub.service.objects.user.APUserService
|
||||||
import dev.usbharu.hideout.application.external.Transaction
|
import dev.usbharu.hideout.application.external.Transaction
|
||||||
import dev.usbharu.hideout.core.external.job.ReceiveFollowJob
|
import dev.usbharu.hideout.core.external.job.ReceiveFollowJob
|
||||||
import dev.usbharu.hideout.core.query.UserQueryService
|
import dev.usbharu.hideout.core.query.UserQueryService
|
||||||
|
|
|
@ -5,8 +5,8 @@ import dev.usbharu.hideout.activitypub.domain.exception.IllegalActivityPubObject
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.Like
|
import dev.usbharu.hideout.activitypub.domain.model.Like
|
||||||
import dev.usbharu.hideout.activitypub.interfaces.api.common.ActivityPubResponse
|
import dev.usbharu.hideout.activitypub.interfaces.api.common.ActivityPubResponse
|
||||||
import dev.usbharu.hideout.activitypub.interfaces.api.common.ActivityPubStringResponse
|
import dev.usbharu.hideout.activitypub.interfaces.api.common.ActivityPubStringResponse
|
||||||
import dev.usbharu.hideout.activitypub.service.`object`.note.APNoteService
|
import dev.usbharu.hideout.activitypub.service.objects.note.APNoteService
|
||||||
import dev.usbharu.hideout.activitypub.service.`object`.user.APUserService
|
import dev.usbharu.hideout.activitypub.service.objects.user.APUserService
|
||||||
import dev.usbharu.hideout.application.external.Transaction
|
import dev.usbharu.hideout.application.external.Transaction
|
||||||
import dev.usbharu.hideout.core.query.PostQueryService
|
import dev.usbharu.hideout.core.query.PostQueryService
|
||||||
import dev.usbharu.hideout.core.service.reaction.ReactionService
|
import dev.usbharu.hideout.core.service.reaction.ReactionService
|
||||||
|
|
|
@ -4,7 +4,7 @@ import dev.usbharu.hideout.activitypub.domain.model.Follow
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.Undo
|
import dev.usbharu.hideout.activitypub.domain.model.Undo
|
||||||
import dev.usbharu.hideout.activitypub.interfaces.api.common.ActivityPubResponse
|
import dev.usbharu.hideout.activitypub.interfaces.api.common.ActivityPubResponse
|
||||||
import dev.usbharu.hideout.activitypub.interfaces.api.common.ActivityPubStringResponse
|
import dev.usbharu.hideout.activitypub.interfaces.api.common.ActivityPubStringResponse
|
||||||
import dev.usbharu.hideout.activitypub.service.`object`.user.APUserService
|
import dev.usbharu.hideout.activitypub.service.objects.user.APUserService
|
||||||
import dev.usbharu.hideout.application.external.Transaction
|
import dev.usbharu.hideout.application.external.Transaction
|
||||||
import dev.usbharu.hideout.core.query.UserQueryService
|
import dev.usbharu.hideout.core.query.UserQueryService
|
||||||
import dev.usbharu.hideout.core.service.user.UserService
|
import dev.usbharu.hideout.core.service.user.UserService
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package dev.usbharu.hideout.activitypub.service.common
|
package dev.usbharu.hideout.activitypub.service.common
|
||||||
|
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
import dev.usbharu.hideout.activitypub.domain.model.objects.Object
|
||||||
import dev.usbharu.hideout.core.domain.model.user.User
|
import dev.usbharu.hideout.core.domain.model.user.User
|
||||||
|
|
||||||
interface APRequestService {
|
interface APRequestService {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package dev.usbharu.hideout.activitypub.service.common
|
package dev.usbharu.hideout.activitypub.service.common
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper
|
import com.fasterxml.jackson.databind.ObjectMapper
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
import dev.usbharu.hideout.activitypub.domain.model.objects.Object
|
||||||
import dev.usbharu.hideout.core.domain.model.user.User
|
import dev.usbharu.hideout.core.domain.model.user.User
|
||||||
import dev.usbharu.hideout.util.Base64Util
|
import dev.usbharu.hideout.util.Base64Util
|
||||||
import dev.usbharu.hideout.util.HttpUtil.Activity
|
import dev.usbharu.hideout.util.HttpUtil.Activity
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package dev.usbharu.hideout.activitypub.service.common
|
package dev.usbharu.hideout.activitypub.service.common
|
||||||
|
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
import dev.usbharu.hideout.activitypub.domain.model.objects.Object
|
||||||
import dev.usbharu.hideout.core.domain.model.user.User
|
import dev.usbharu.hideout.core.domain.model.user.User
|
||||||
|
|
||||||
interface APResourceResolveService {
|
interface APResourceResolveService {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package dev.usbharu.hideout.activitypub.service.common
|
package dev.usbharu.hideout.activitypub.service.common
|
||||||
|
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
import dev.usbharu.hideout.activitypub.domain.model.objects.Object
|
||||||
import dev.usbharu.hideout.core.domain.model.user.User
|
import dev.usbharu.hideout.core.domain.model.user.User
|
||||||
import dev.usbharu.hideout.core.domain.model.user.UserRepository
|
import dev.usbharu.hideout.core.domain.model.user.UserRepository
|
||||||
import org.springframework.stereotype.Service
|
import org.springframework.stereotype.Service
|
||||||
|
|
|
@ -2,7 +2,7 @@ package dev.usbharu.hideout.activitypub.service.common
|
||||||
|
|
||||||
import dev.usbharu.hideout.activitypub.service.activity.follow.APReceiveFollowJobService
|
import dev.usbharu.hideout.activitypub.service.activity.follow.APReceiveFollowJobService
|
||||||
import dev.usbharu.hideout.activitypub.service.activity.like.ApReactionJobService
|
import dev.usbharu.hideout.activitypub.service.activity.like.ApReactionJobService
|
||||||
import dev.usbharu.hideout.activitypub.service.`object`.note.ApNoteJobService
|
import dev.usbharu.hideout.activitypub.service.objects.note.ApNoteJobService
|
||||||
import dev.usbharu.hideout.core.external.job.*
|
import dev.usbharu.hideout.core.external.job.*
|
||||||
import kjob.core.dsl.JobContextWithProps
|
import kjob.core.dsl.JobContextWithProps
|
||||||
import kjob.core.job.JobProps
|
import kjob.core.job.JobProps
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package dev.usbharu.hideout.activitypub.service.common
|
package dev.usbharu.hideout.activitypub.service.common
|
||||||
|
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
import dev.usbharu.hideout.activitypub.domain.model.objects.Object
|
||||||
|
|
||||||
interface CacheManager {
|
interface CacheManager {
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package dev.usbharu.hideout.activitypub.service.common
|
package dev.usbharu.hideout.activitypub.service.common
|
||||||
|
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
import dev.usbharu.hideout.activitypub.domain.model.objects.Object
|
||||||
import dev.usbharu.hideout.util.LruCache
|
import dev.usbharu.hideout.util.LruCache
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import kotlinx.coroutines.sync.Mutex
|
import kotlinx.coroutines.sync.Mutex
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.activitypub.service.`object`.note
|
package dev.usbharu.hideout.activitypub.service.objects.note
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper
|
import com.fasterxml.jackson.databind.ObjectMapper
|
||||||
import dev.usbharu.hideout.activitypub.domain.exception.FailedToGetActivityPubResourceException
|
import dev.usbharu.hideout.activitypub.domain.exception.FailedToGetActivityPubResourceException
|
||||||
|
@ -6,7 +6,7 @@ import dev.usbharu.hideout.activitypub.domain.exception.IllegalActivityPubObject
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.Note
|
import dev.usbharu.hideout.activitypub.domain.model.Note
|
||||||
import dev.usbharu.hideout.activitypub.service.common.APResourceResolveService
|
import dev.usbharu.hideout.activitypub.service.common.APResourceResolveService
|
||||||
import dev.usbharu.hideout.activitypub.service.common.resolve
|
import dev.usbharu.hideout.activitypub.service.common.resolve
|
||||||
import dev.usbharu.hideout.activitypub.service.`object`.user.APUserService
|
import dev.usbharu.hideout.activitypub.service.objects.user.APUserService
|
||||||
import dev.usbharu.hideout.core.domain.exception.FailedToGetResourcesException
|
import dev.usbharu.hideout.core.domain.exception.FailedToGetResourcesException
|
||||||
import dev.usbharu.hideout.core.domain.model.post.Post
|
import dev.usbharu.hideout.core.domain.model.post.Post
|
||||||
import dev.usbharu.hideout.core.domain.model.post.PostRepository
|
import dev.usbharu.hideout.core.domain.model.post.PostRepository
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.activitypub.service.`object`.note
|
package dev.usbharu.hideout.activitypub.service.objects.note
|
||||||
|
|
||||||
import dev.usbharu.hideout.core.external.job.DeliverPostJob
|
import dev.usbharu.hideout.core.external.job.DeliverPostJob
|
||||||
import kjob.core.job.JobProps
|
import kjob.core.job.JobProps
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.activitypub.service.`object`.note
|
package dev.usbharu.hideout.activitypub.service.objects.note
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper
|
import com.fasterxml.jackson.databind.ObjectMapper
|
||||||
import com.fasterxml.jackson.module.kotlin.readValue
|
import com.fasterxml.jackson.module.kotlin.readValue
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.activitypub.service.`object`.note
|
package dev.usbharu.hideout.activitypub.service.objects.note
|
||||||
|
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.Note
|
import dev.usbharu.hideout.activitypub.domain.model.Note
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.activitypub.service.`object`.note
|
package dev.usbharu.hideout.activitypub.service.objects.note
|
||||||
|
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.Note
|
import dev.usbharu.hideout.activitypub.domain.model.Note
|
||||||
import dev.usbharu.hideout.activitypub.query.NoteQueryService
|
import dev.usbharu.hideout.activitypub.query.NoteQueryService
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.activitypub.service.`object`.user
|
package dev.usbharu.hideout.activitypub.service.objects.user
|
||||||
|
|
||||||
import dev.usbharu.hideout.activitypub.domain.exception.IllegalActivityPubObjectException
|
import dev.usbharu.hideout.activitypub.domain.exception.IllegalActivityPubObjectException
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.Image
|
import dev.usbharu.hideout.activitypub.domain.model.Image
|
|
@ -25,7 +25,8 @@ class MediaServiceImpl(
|
||||||
) : MediaService {
|
) : MediaService {
|
||||||
override suspend fun uploadLocalMedia(mediaRequest: MediaRequest): EntityMedia {
|
override suspend fun uploadLocalMedia(mediaRequest: MediaRequest): EntityMedia {
|
||||||
logger.info(
|
logger.info(
|
||||||
"Media upload. filename:${mediaRequest.file.name} size:${mediaRequest.file.size} contentType:${mediaRequest.file.contentType}"
|
"Media upload. filename:${mediaRequest.file.name} size:${mediaRequest.file.size} " +
|
||||||
|
"contentType:${mediaRequest.file.contentType}"
|
||||||
)
|
)
|
||||||
|
|
||||||
if (mediaRequest.file.size == 0L) {
|
if (mediaRequest.file.size == 0L) {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import dev.usbharu.hideout.activitypub.domain.model.Create
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.Like
|
import dev.usbharu.hideout.activitypub.domain.model.Like
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.Note
|
import dev.usbharu.hideout.activitypub.domain.model.Note
|
||||||
import dev.usbharu.hideout.activitypub.interfaces.api.common.ActivityPubStringResponse
|
import dev.usbharu.hideout.activitypub.interfaces.api.common.ActivityPubStringResponse
|
||||||
import dev.usbharu.hideout.activitypub.service.`object`.note.APNoteService
|
import dev.usbharu.hideout.activitypub.service.objects.note.APNoteService
|
||||||
import io.ktor.http.*
|
import io.ktor.http.*
|
||||||
import kotlinx.coroutines.test.runTest
|
import kotlinx.coroutines.test.runTest
|
||||||
import org.junit.jupiter.api.Assertions.assertEquals
|
import org.junit.jupiter.api.Assertions.assertEquals
|
||||||
|
|
|
@ -7,7 +7,7 @@ import dev.usbharu.hideout.activitypub.domain.model.Follow
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.Image
|
import dev.usbharu.hideout.activitypub.domain.model.Image
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.Key
|
import dev.usbharu.hideout.activitypub.domain.model.Key
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.Person
|
import dev.usbharu.hideout.activitypub.domain.model.Person
|
||||||
import dev.usbharu.hideout.activitypub.service.`object`.user.APUserService
|
import dev.usbharu.hideout.activitypub.service.objects.user.APUserService
|
||||||
import dev.usbharu.hideout.application.config.ApplicationConfig
|
import dev.usbharu.hideout.application.config.ApplicationConfig
|
||||||
import dev.usbharu.hideout.application.config.CharacterLimit
|
import dev.usbharu.hideout.application.config.CharacterLimit
|
||||||
import dev.usbharu.hideout.core.domain.model.post.Post
|
import dev.usbharu.hideout.core.domain.model.post.Post
|
||||||
|
|
|
@ -5,8 +5,8 @@ import dev.usbharu.hideout.activitypub.domain.model.Like
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.Note
|
import dev.usbharu.hideout.activitypub.domain.model.Note
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.Person
|
import dev.usbharu.hideout.activitypub.domain.model.Person
|
||||||
import dev.usbharu.hideout.activitypub.interfaces.api.common.ActivityPubStringResponse
|
import dev.usbharu.hideout.activitypub.interfaces.api.common.ActivityPubStringResponse
|
||||||
import dev.usbharu.hideout.activitypub.service.`object`.note.APNoteService
|
import dev.usbharu.hideout.activitypub.service.objects.note.APNoteService
|
||||||
import dev.usbharu.hideout.activitypub.service.`object`.user.APUserService
|
import dev.usbharu.hideout.activitypub.service.objects.user.APUserService
|
||||||
import dev.usbharu.hideout.core.query.PostQueryService
|
import dev.usbharu.hideout.core.query.PostQueryService
|
||||||
import dev.usbharu.hideout.core.service.reaction.ReactionService
|
import dev.usbharu.hideout.core.service.reaction.ReactionService
|
||||||
import io.ktor.http.*
|
import io.ktor.http.*
|
||||||
|
|
|
@ -9,7 +9,7 @@ import org.junit.jupiter.api.extension.ExtendWith
|
||||||
import org.mockito.junit.jupiter.MockitoExtension
|
import org.mockito.junit.jupiter.MockitoExtension
|
||||||
import org.mockito.kotlin.*
|
import org.mockito.kotlin.*
|
||||||
import utils.UserBuilder
|
import utils.UserBuilder
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object as APObject
|
import dev.usbharu.hideout.activitypub.domain.model.objects.Object as APObject
|
||||||
|
|
||||||
@ExtendWith(MockitoExtension::class)
|
@ExtendWith(MockitoExtension::class)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
@file:OptIn(ExperimentalCoroutinesApi::class) @file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
@file:OptIn(ExperimentalCoroutinesApi::class) @file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||||
|
|
||||||
package dev.usbharu.hideout.activitypub.service.`object`.note
|
package dev.usbharu.hideout.activitypub.service.objects.note
|
||||||
|
|
||||||
import dev.usbharu.hideout.activitypub.domain.exception.FailedToGetActivityPubResourceException
|
import dev.usbharu.hideout.activitypub.domain.exception.FailedToGetActivityPubResourceException
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.Image
|
import dev.usbharu.hideout.activitypub.domain.model.Image
|
||||||
|
@ -8,8 +8,8 @@ import dev.usbharu.hideout.activitypub.domain.model.Key
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.Note
|
import dev.usbharu.hideout.activitypub.domain.model.Note
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.Person
|
import dev.usbharu.hideout.activitypub.domain.model.Person
|
||||||
import dev.usbharu.hideout.activitypub.service.common.APResourceResolveService
|
import dev.usbharu.hideout.activitypub.service.common.APResourceResolveService
|
||||||
import dev.usbharu.hideout.activitypub.service.`object`.note.APNoteServiceImpl.Companion.public
|
import dev.usbharu.hideout.activitypub.service.objects.note.APNoteServiceImpl.Companion.public
|
||||||
import dev.usbharu.hideout.activitypub.service.`object`.user.APUserService
|
import dev.usbharu.hideout.activitypub.service.objects.user.APUserService
|
||||||
import dev.usbharu.hideout.application.config.ApplicationConfig
|
import dev.usbharu.hideout.application.config.ApplicationConfig
|
||||||
import dev.usbharu.hideout.application.config.CharacterLimit
|
import dev.usbharu.hideout.application.config.CharacterLimit
|
||||||
import dev.usbharu.hideout.application.service.id.TwitterSnowflakeIdGenerateService
|
import dev.usbharu.hideout.application.service.id.TwitterSnowflakeIdGenerateService
|
|
@ -1,6 +1,6 @@
|
||||||
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||||
|
|
||||||
package dev.usbharu.hideout.activitypub.service.`object`.note
|
package dev.usbharu.hideout.activitypub.service.objects.note
|
||||||
|
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.Create
|
import dev.usbharu.hideout.activitypub.domain.model.Create
|
||||||
import dev.usbharu.hideout.activitypub.domain.model.Note
|
import dev.usbharu.hideout.activitypub.domain.model.Note
|
Loading…
Reference in New Issue