mirror of https://github.com/usbharu/Hideout.git
style: スタイルを修正
This commit is contained in:
parent
cb2ee6ca3f
commit
bfda7478ee
|
@ -92,7 +92,7 @@ exceptions:
|
||||||
active: true
|
active: true
|
||||||
|
|
||||||
NotImplementedDeclaration:
|
NotImplementedDeclaration:
|
||||||
active: true
|
active: false
|
||||||
|
|
||||||
ObjectExtendsThrowable:
|
ObjectExtendsThrowable:
|
||||||
active: true
|
active: true
|
||||||
|
|
|
@ -20,10 +20,7 @@ open class Accept : Object {
|
||||||
this.`object` = `object`
|
this.`object` = `object`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun toString(): String = "Accept(`object`=$`object`) ${super.toString()}"
|
||||||
override fun toString(): String {
|
|
||||||
return "Accept(`object`=$`object`) ${super.toString()}"
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
if (this === other) return true
|
if (this === other) return true
|
||||||
|
@ -38,6 +35,4 @@ open class Accept : Object {
|
||||||
result = 31 * result + (`object`?.hashCode() ?: 0)
|
result = 31 * result + (`object`?.hashCode() ?: 0)
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,9 +31,5 @@ open class Follow : Object {
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun toString(): String {
|
override fun toString(): String = "Follow(`object`=$`object`) ${super.toString()}"
|
||||||
return "Follow(`object`=$`object`) ${super.toString()}"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,5 +45,4 @@ class ObjectDeserializer : JsonDeserializer<Object>() {
|
||||||
TODO()
|
TODO()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package dev.usbharu.hideout.domain.model.ap
|
package dev.usbharu.hideout.domain.model.ap
|
||||||
|
|
||||||
class ObjectValue : Object {
|
open class ObjectValue : Object {
|
||||||
|
|
||||||
var `object`: String? = null
|
var `object`: String? = null
|
||||||
|
|
||||||
protected constructor()
|
protected constructor() : super()
|
||||||
constructor(type: List<String>, name: String?, actor: String?, id: String?, `object`: String?) : super(
|
constructor(type: List<String>, name: String?, actor: String?, id: String?, `object`: String?) : super(
|
||||||
type,
|
type,
|
||||||
name,
|
name,
|
||||||
|
@ -28,9 +28,5 @@ class ObjectValue : Object {
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun toString(): String {
|
override fun toString(): String = "ObjectValue(`object`=$`object`) ${super.toString()}"
|
||||||
return "ObjectValue(`object`=$`object`) ${super.toString()}"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,13 +3,13 @@ package dev.usbharu.hideout.domain.model.ap
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
|
||||||
import java.time.Instant
|
import java.time.Instant
|
||||||
|
|
||||||
class Undo : Object {
|
open class Undo : Object {
|
||||||
|
|
||||||
@JsonDeserialize(using = ObjectDeserializer::class)
|
@JsonDeserialize(using = ObjectDeserializer::class)
|
||||||
var `object`: Object? = null
|
var `object`: Object? = null
|
||||||
var published: String? = null
|
var published: String? = null
|
||||||
|
|
||||||
protected constructor()
|
protected constructor() : super()
|
||||||
constructor(
|
constructor(
|
||||||
type: List<String> = emptyList(),
|
type: List<String> = emptyList(),
|
||||||
name: String,
|
name: String,
|
||||||
|
@ -38,9 +38,5 @@ class Undo : Object {
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun toString(): String {
|
override fun toString(): String = "Undo(`object`=$`object`, published=$published) ${super.toString()}"
|
||||||
return "Undo(`object`=$`object`, published=$published) ${super.toString()}"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,6 @@ class ActivityPubUndoServiceImpl(
|
||||||
private val activityPubUserService: ActivityPubUserService
|
private val activityPubUserService: ActivityPubUserService
|
||||||
) : ActivityPubUndoService {
|
) : ActivityPubUndoService {
|
||||||
override suspend fun receiveUndo(undo: Undo): ActivityPubResponse {
|
override suspend fun receiveUndo(undo: Undo): ActivityPubResponse {
|
||||||
|
|
||||||
if (undo.actor == null) {
|
if (undo.actor == null) {
|
||||||
return ActivityPubStringResponse(HttpStatusCode.BadRequest, "actor is null")
|
return ActivityPubStringResponse(HttpStatusCode.BadRequest, "actor is null")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue