mirror of https://github.com/usbharu/Hideout.git
style: スタイルを修正
This commit is contained in:
parent
04af985471
commit
d141b60ab2
|
@ -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)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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"))
|
||||||
|
|
|
@ -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>)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue