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