diff --git a/src/main/kotlin/dev/usbharu/hideout/service/activitypub/ActivityPubUserServiceImpl.kt b/src/main/kotlin/dev/usbharu/hideout/service/activitypub/ActivityPubUserServiceImpl.kt
index 09c4b601..76372479 100644
--- a/src/main/kotlin/dev/usbharu/hideout/service/activitypub/ActivityPubUserServiceImpl.kt
+++ b/src/main/kotlin/dev/usbharu/hideout/service/activitypub/ActivityPubUserServiceImpl.kt
@@ -16,6 +16,7 @@ import io.ktor.client.*
import io.ktor.client.request.*
import io.ktor.client.statement.*
import io.ktor.http.*
+import org.slf4j.LoggerFactory
class ActivityPubUserServiceImpl(
private val userService: UserService,
@@ -23,6 +24,8 @@ class ActivityPubUserServiceImpl(
private val httpClient: HttpClient
) :
ActivityPubUserService {
+
+ private val logger = LoggerFactory.getLogger(this::class.java)
override suspend fun getPersonByName(name: String): Person {
// TODO: JOINで書き直し
val userEntity = userService.findByName(name)
@@ -91,7 +94,7 @@ class ActivityPubUserServiceImpl(
name = person.preferredUsername
?: throw IllegalActivityPubObjectException("preferredUsername is null"),
domain = url.substringAfter(":").substringBeforeLast("/"),
- screenName = person.name ?: throw IllegalActivityPubObjectException("name is null"),
+ screenName = (person.name ?: person.preferredUsername) ?: throw IllegalActivityPubObjectException("preferredUsername is null"),
description = person.summary ?: throw IllegalActivityPubObjectException("summary is null"),
inbox = person.inbox ?: throw IllegalActivityPubObjectException("inbox is null"),
outbox = person.outbox ?: throw IllegalActivityPubObjectException("outbox is null"),
diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml
index 60418308..a2c79be6 100644
--- a/src/main/resources/logback.xml
+++ b/src/main/resources/logback.xml
@@ -9,4 +9,6 @@
+
+