fix: 軽微な修正、ロガーを追加

This commit is contained in:
usbharu 2023-04-29 13:02:38 +09:00
parent a31b1226e9
commit c61710f476
3 changed files with 4 additions and 3 deletions

View File

@ -35,6 +35,7 @@ class ContentTypeRouteSelector(private vararg val contentType: ContentType) : Ro
val requestContentType =
ContentType.parse(context.call.request.accept() ?: return RouteSelectorEvaluation.FailedParameter)
context.call.application.log.debug("Content-Type: {}", contentType)
return if (contentType.any { contentType -> contentType.match(requestContentType) }) {
RouteSelectorEvaluation.Constant
} else {

View File

@ -45,7 +45,7 @@ class ActivityPubNoteServiceImpl(
attributedTo = actor,
content = postEntity.text,
published = Instant.ofEpochMilli(postEntity.createdAt).toString(),
to = listOf("https://www.w3.org/ns/activitystreams#Public", actor + "/followers")
to = listOf("https://www.w3.org/ns/activitystreams#Public", actor + "/follower")
)
val inbox = props[DeliverPostJob.inbox]
logger.debug("createNoteJob: actor={}, note={}, inbox={}", actor, postEntity, inbox)

View File

@ -89,7 +89,7 @@ class ActivityPubUserServiceImpl(
RemoteUserCreateDto(
name = person.preferredUsername
?: throw IllegalActivityPubObjectException("preferredUsername is null"),
domain = url.substringAfter("://").substringBefore("/"),
domain = url.substringAfter("://").substringBeforeLast("/"),
screenName = (person.name ?: person.preferredUsername) ?: throw IllegalActivityPubObjectException("preferredUsername is null"),
description = person.summary ?: "",
inbox = person.inbox ?: throw IllegalActivityPubObjectException("inbox is null"),