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
35d957567c
commit
578247b966
|
@ -10,7 +10,6 @@ import dev.usbharu.hideout.core.query.UserQueryService
|
||||||
import dev.usbharu.hideout.core.service.relationship.RelationshipService
|
import dev.usbharu.hideout.core.service.relationship.RelationshipService
|
||||||
import org.springframework.stereotype.Service
|
import org.springframework.stereotype.Service
|
||||||
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
class ApRejectProcessor(
|
class ApRejectProcessor(
|
||||||
private val relationshipService: RelationshipService,
|
private val relationshipService: RelationshipService,
|
||||||
|
@ -19,7 +18,6 @@ class ApRejectProcessor(
|
||||||
) :
|
) :
|
||||||
AbstractActivityPubProcessor<Reject>(transaction) {
|
AbstractActivityPubProcessor<Reject>(transaction) {
|
||||||
override suspend fun internalProcess(activity: ActivityPubProcessContext<Reject>) {
|
override suspend fun internalProcess(activity: ActivityPubProcessContext<Reject>) {
|
||||||
|
|
||||||
val activityType = activity.activity.apObject.type.firstOrNull { it == "Follow" }
|
val activityType = activity.activity.apObject.type.firstOrNull { it == "Follow" }
|
||||||
|
|
||||||
if (activityType == null) {
|
if (activityType == null) {
|
||||||
|
|
|
@ -55,7 +55,6 @@ class APUndoProcessor(
|
||||||
"Accept" -> {
|
"Accept" -> {
|
||||||
val accept = undo.apObject as Accept
|
val accept = undo.apObject as Accept
|
||||||
|
|
||||||
|
|
||||||
val acceptObject = if (accept.apObject is ObjectValue) {
|
val acceptObject = if (accept.apObject is ObjectValue) {
|
||||||
accept.apObject.`object`
|
accept.apObject.`object`
|
||||||
} else if (accept.apObject is Follow) {
|
} else if (accept.apObject is Follow) {
|
||||||
|
|
Loading…
Reference in New Issue