This commit is contained in:
usbharu 2023-12-08 12:29:26 +09:00
parent 0ac4e37f0a
commit 7e93db6c7e
1 changed files with 10 additions and 11 deletions

View File

@ -7,7 +7,7 @@ import dev.usbharu.hideout.activitypub.domain.model.objects.ObjectDeserializer
open class Create( open class Create(
type: List<String> = emptyList(), type: List<String> = emptyList(),
override val name: String, val name: String? = null,
@JsonDeserialize(using = ObjectDeserializer::class) @JsonDeserialize(using = ObjectDeserializer::class)
@JsonProperty("object") @JsonProperty("object")
val apObject: Object, val apObject: Object,
@ -19,7 +19,6 @@ open class Create(
type = add(type, "Create") type = add(type, "Create")
), ),
HasId, HasId,
HasName,
HasActor { HasActor {
override fun equals(other: Any?): Boolean { override fun equals(other: Any?): Boolean {
@ -41,7 +40,7 @@ open class Create(
override fun hashCode(): Int { override fun hashCode(): Int {
var result = super.hashCode() var result = super.hashCode()
result = 31 * result + name.hashCode() result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + apObject.hashCode() result = 31 * result + apObject.hashCode()
result = 31 * result + actor.hashCode() result = 31 * result + actor.hashCode()
result = 31 * result + id.hashCode() result = 31 * result + id.hashCode()
@ -52,7 +51,7 @@ open class Create(
override fun toString(): String { override fun toString(): String {
return "Create(" + return "Create(" +
"name='$name', " + "name=$name, " +
"apObject=$apObject, " + "apObject=$apObject, " +
"actor='$actor', " + "actor='$actor', " +
"id='$id', " + "id='$id', " +