fix: undoにpublishedが必須になっていたのを修正

This commit is contained in:
usbharu 2024-01-29 10:59:32 +09:00
parent fe3082db59
commit ed715e0af4
1 changed files with 6 additions and 6 deletions

View File

@ -11,7 +11,7 @@ open class Undo(
override val id: String, override val id: String,
@JsonDeserialize(using = ObjectDeserializer::class) @JsonDeserialize(using = ObjectDeserializer::class)
@JsonProperty("object") val apObject: Object, @JsonProperty("object") val apObject: Object,
val published: String val published: String?
) : Object(add(type, "Undo")), HasId, HasActor { ) : Object(add(type, "Undo")), HasId, HasActor {
override fun equals(other: Any?): Boolean { override fun equals(other: Any?): Boolean {
@ -21,20 +21,20 @@ open class Undo(
other as Undo other as Undo
if (apObject != other.apObject) return false
if (published != other.published) return false
if (actor != other.actor) return false if (actor != other.actor) return false
if (id != other.id) return false if (id != other.id) return false
if (apObject != other.apObject) return false
if (published != other.published) return false
return true return true
} }
override fun hashCode(): Int { override fun hashCode(): Int {
var result = super.hashCode() var result = super.hashCode()
result = 31 * result + apObject.hashCode()
result = 31 * result + published.hashCode()
result = 31 * result + actor.hashCode() result = 31 * result + actor.hashCode()
result = 31 * result + id.hashCode() result = 31 * result + id.hashCode()
result = 31 * result + apObject.hashCode()
result = 31 * result + (published?.hashCode() ?: 0)
return result return result
} }
@ -43,7 +43,7 @@ open class Undo(
"actor='$actor', " + "actor='$actor', " +
"id='$id', " + "id='$id', " +
"apObject=$apObject, " + "apObject=$apObject, " +
"published='$published'" + "published=$published" +
")" + ")" +
" ${super.toString()}" " ${super.toString()}"
} }