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
) {
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
): Note {
val person = activityPubUserService.fetchPerson(
note.attributedTo ?: throw IllegalActivityPubObjectException("note.attributedTo is null"), targetActor
note.attributedTo ?: throw IllegalActivityPubObjectException("note.attributedTo is null"),
targetActor
)
val user =
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) {
logger.debug("processActivity: ${hideoutJob.name}")
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>)
}
}

View File

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