From 8264d798b8e83b75f41e131a44a6d59750acc5a5 Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Thu, 2 Nov 2023 20:09:45 +0900 Subject: [PATCH] style: fix lint --- .../service/common/APRequestServiceImpl.kt | 1 + .../exposedquery/StatusQueryServiceImpl.kt | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/kotlin/dev/usbharu/hideout/activitypub/service/common/APRequestServiceImpl.kt b/src/main/kotlin/dev/usbharu/hideout/activitypub/service/common/APRequestServiceImpl.kt index 6e8edef9..6e87d402 100644 --- a/src/main/kotlin/dev/usbharu/hideout/activitypub/service/common/APRequestServiceImpl.kt +++ b/src/main/kotlin/dev/usbharu/hideout/activitypub/service/common/APRequestServiceImpl.kt @@ -96,6 +96,7 @@ class APRequestServiceImpl( return objectMapper.readValue(bodyAsText, responseClass) } + @Suppress("LongMethod") override suspend fun apPost(url: String, body: T?, signer: User?): String { logger.debug("START ActivityPub Request POST url: {}, signer: {}", url, signer?.url) val requestBody = if (body != null) { diff --git a/src/main/kotlin/dev/usbharu/hideout/mastodon/infrastructure/exposedquery/StatusQueryServiceImpl.kt b/src/main/kotlin/dev/usbharu/hideout/mastodon/infrastructure/exposedquery/StatusQueryServiceImpl.kt index 7589fcb6..c300375a 100644 --- a/src/main/kotlin/dev/usbharu/hideout/mastodon/infrastructure/exposedquery/StatusQueryServiceImpl.kt +++ b/src/main/kotlin/dev/usbharu/hideout/mastodon/infrastructure/exposedquery/StatusQueryServiceImpl.kt @@ -48,12 +48,12 @@ class StatusQueryServiceImpl : StatusQueryService { } } - return statusQueries.mapNotNull { - postMap[it.postId]?.copy( - inReplyToId = it.replyId?.toString(), - inReplyToAccountId = postMap[it.replyId]?.account?.id, - reblog = postMap[it.repostId], - mediaAttachments = it.mediaIds.mapNotNull { mediaMap[it] } + return statusQueries.mapNotNull { statusQuery -> + postMap[statusQuery.postId]?.copy( + inReplyToId = statusQuery.replyId?.toString(), + inReplyToAccountId = postMap[statusQuery.replyId]?.account?.id, + reblog = postMap[statusQuery.repostId], + mediaAttachments = statusQuery.mediaIds.mapNotNull { mediaMap[it] } ) } }