style: スタイルを修正

This commit is contained in:
usbharu 2023-06-02 17:11:52 +09:00
parent c3788c8127
commit f2c2370659
4 changed files with 10 additions and 3 deletions

View File

@ -17,6 +17,8 @@ data class User(
val createdAt: Instant val createdAt: Instant
) { ) {
override fun toString(): String { override fun toString(): String {
return "User(id=$id, name='$name', domain='$domain', screenName='$screenName', description='$description', password=****, inbox='$inbox', outbox='$outbox', url='$url', publicKey='$publicKey', privateKey=****, createdAt=$createdAt)" return "User(id=$id, name='$name', domain='$domain', screenName='$screenName', description='$description'," +
" password=****, inbox='$inbox', outbox='$outbox', url='$url', publicKey='$publicKey'," +
" privateKey=****, createdAt=$createdAt)"
} }
} }

View File

@ -100,7 +100,8 @@ class ActivityPubNoteServiceImpl(
url: String url: String
): Note { ): Note {
val person = activityPubUserService.fetchPerson( val person = activityPubUserService.fetchPerson(
note.attributedTo ?: throw IllegalActivityPubObjectException("note.attributedTo is null"), targetActor note.attributedTo ?: throw IllegalActivityPubObjectException("note.attributedTo is null"),
targetActor
) )
val user = val user =
userService.findByUrl(person.url ?: throw IllegalActivityPubObjectException("person.url is null")) userService.findByUrl(person.url ?: throw IllegalActivityPubObjectException("person.url is null"))

View File

@ -64,7 +64,10 @@ class ActivityPubServiceImpl(
override suspend fun <T : HideoutJob> processActivity(job: JobContextWithProps<T>, hideoutJob: HideoutJob) { override suspend fun <T : HideoutJob> processActivity(job: JobContextWithProps<T>, hideoutJob: HideoutJob) {
logger.debug("processActivity: ${hideoutJob.name}") logger.debug("processActivity: ${hideoutJob.name}")
when (hideoutJob) { when (hideoutJob) {
ReceiveFollowJob -> activityPubReceiveFollowService.receiveFollowJob(job.props as JobProps<ReceiveFollowJob>) ReceiveFollowJob -> activityPubReceiveFollowService.receiveFollowJob(
job.props as JobProps<ReceiveFollowJob>
)
DeliverPostJob -> activityPubNoteService.createNoteJob(job.props as JobProps<DeliverPostJob>) DeliverPostJob -> activityPubNoteService.createNoteJob(job.props as JobProps<DeliverPostJob>)
} }
} }

View File

@ -9,6 +9,7 @@ import io.ktor.http.*
import org.koin.core.annotation.Single import org.koin.core.annotation.Single
@Single @Single
@Suppress("UnsafeCallOnNullableType")
class ActivityPubUndoServiceImpl( class ActivityPubUndoServiceImpl(
private val userService: IUserService, private val userService: IUserService,
private val activityPubUserService: ActivityPubUserService private val activityPubUserService: ActivityPubUserService