mirror of https://github.com/usbharu/Hideout.git
fix: 軽微な修正、ロガーを追加
This commit is contained in:
parent
a31b1226e9
commit
c61710f476
|
@ -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 {
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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"),
|
||||
|
|
Loading…
Reference in New Issue