mirror of https://github.com/usbharu/Hideout.git
Apply suggestions from code review
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
b3002625a4
commit
05537c4a3b
|
@ -36,6 +36,4 @@ open class Image(
|
|||
")" +
|
||||
" ${super.toString()}"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -99,7 +99,6 @@ class InboxJobProcessor(
|
|||
|
||||
val verify = signature?.let { verifyHttpSignature(httpRequest, it, transaction) } ?: false
|
||||
|
||||
|
||||
logger.debug("Is verifying success? {}", verify)
|
||||
|
||||
val activityPubProcessor =
|
||||
|
@ -114,7 +113,6 @@ class InboxJobProcessor(
|
|||
activityPubProcessor.process(ActivityPubProcessContext(value, jsonNode, httpRequest, signature, verify))
|
||||
|
||||
logger.info("SUCCESS Process inbox. type: {}", param.type)
|
||||
|
||||
}
|
||||
|
||||
override fun job(): InboxJob = InboxJob
|
||||
|
|
|
@ -37,7 +37,6 @@ class HttpSignatureUserDetailsService(
|
|||
try {
|
||||
userQueryService.findByKeyId(keyId)
|
||||
} catch (e: FailedToGetResourcesException) {
|
||||
|
||||
throw UsernameNotFoundException("User not found", e)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -92,10 +92,8 @@ class AccountApiServiceImpl(
|
|||
}
|
||||
|
||||
override suspend fun follow(userid: Long, followeeId: Long): Relationship = transaction.transaction {
|
||||
|
||||
val alreadyFollow = followerQueryService.alreadyFollow(followeeId, userid)
|
||||
|
||||
|
||||
val followRequest = if (alreadyFollow) {
|
||||
true
|
||||
} else {
|
||||
|
@ -133,13 +131,11 @@ class AccountApiServiceImpl(
|
|||
return@transaction emptyList()
|
||||
}
|
||||
|
||||
|
||||
logger.warn("id is too long! ({}) truncate to 20", id.size)
|
||||
|
||||
val subList = id.subList(0, min(id.size, 20))
|
||||
|
||||
return@transaction subList.map {
|
||||
|
||||
val alreadyFollow = followerQueryService.alreadyFollow(userid, it)
|
||||
|
||||
val followed = followerQueryService.alreadyFollow(it, userid)
|
||||
|
|
Loading…
Reference in New Issue