From bed0b84d16b9e7fc64a47f89647a948132d63beb Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Fri, 22 Dec 2023 16:23:18 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20Object=E3=81=AE=E3=83=87=E3=82=A4?= =?UTF-8?q?=E3=82=B7=E3=83=AA=E3=82=A2=E3=83=A9=E3=82=A4=E3=82=BA=E3=81=AB?= =?UTF-8?q?=E5=A4=B1=E6=95=97=E3=81=97=E3=81=9F=E3=81=A8=E3=81=8Dnull?= =?UTF-8?q?=E3=82=92=E8=BF=94=E3=81=99=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../model/objects/ObjectDeserializer.kt | 84 +++++++++---------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/src/main/kotlin/dev/usbharu/hideout/activitypub/domain/model/objects/ObjectDeserializer.kt b/src/main/kotlin/dev/usbharu/hideout/activitypub/domain/model/objects/ObjectDeserializer.kt index dd0b413b..74076768 100644 --- a/src/main/kotlin/dev/usbharu/hideout/activitypub/domain/model/objects/ObjectDeserializer.kt +++ b/src/main/kotlin/dev/usbharu/hideout/activitypub/domain/model/objects/ObjectDeserializer.kt @@ -26,69 +26,69 @@ class ObjectDeserializer : JsonDeserializer() { } else if (type.isValueNode) { ExtendedActivityVocabulary.values().firstOrNull() { it.name.equals(type.asText(), true) } } else { - TODO() + null } return when (activityType) { ExtendedActivityVocabulary.Follow -> p.codec.treeToValue(treeNode, Follow::class.java) ExtendedActivityVocabulary.Note -> p.codec.treeToValue(treeNode, Note::class.java) ExtendedActivityVocabulary.Object -> p.codec.treeToValue(treeNode, Object::class.java) - ExtendedActivityVocabulary.Link -> TODO() - ExtendedActivityVocabulary.Activity -> TODO() - ExtendedActivityVocabulary.IntransitiveActivity -> TODO() - ExtendedActivityVocabulary.Collection -> TODO() - ExtendedActivityVocabulary.OrderedCollection -> TODO() - ExtendedActivityVocabulary.CollectionPage -> TODO() - ExtendedActivityVocabulary.OrderedCollectionPage -> TODO() + ExtendedActivityVocabulary.Link -> null + ExtendedActivityVocabulary.Activity -> null + ExtendedActivityVocabulary.IntransitiveActivity -> null + ExtendedActivityVocabulary.Collection -> null + ExtendedActivityVocabulary.OrderedCollection -> null + ExtendedActivityVocabulary.CollectionPage -> null + ExtendedActivityVocabulary.OrderedCollectionPage -> null ExtendedActivityVocabulary.Accept -> p.codec.treeToValue(treeNode, Accept::class.java) - ExtendedActivityVocabulary.Add -> TODO() - ExtendedActivityVocabulary.Announce -> TODO() - ExtendedActivityVocabulary.Arrive -> TODO() + ExtendedActivityVocabulary.Add -> null + ExtendedActivityVocabulary.Announce -> null + ExtendedActivityVocabulary.Arrive -> null ExtendedActivityVocabulary.Block -> p.codec.treeToValue(treeNode, Block::class.java) ExtendedActivityVocabulary.Create -> p.codec.treeToValue(treeNode, Create::class.java) ExtendedActivityVocabulary.Delete -> p.codec.treeToValue(treeNode, Delete::class.java) - ExtendedActivityVocabulary.Dislike -> TODO() - ExtendedActivityVocabulary.Flag -> TODO() - ExtendedActivityVocabulary.Ignore -> TODO() - ExtendedActivityVocabulary.Invite -> TODO() - ExtendedActivityVocabulary.Join -> TODO() - ExtendedActivityVocabulary.Leave -> TODO() + ExtendedActivityVocabulary.Dislike -> null + ExtendedActivityVocabulary.Flag -> null + ExtendedActivityVocabulary.Ignore -> null + ExtendedActivityVocabulary.Invite -> null + ExtendedActivityVocabulary.Join -> null + ExtendedActivityVocabulary.Leave -> null ExtendedActivityVocabulary.Like -> p.codec.treeToValue(treeNode, Like::class.java) - ExtendedActivityVocabulary.Listen -> TODO() - ExtendedActivityVocabulary.Move -> TODO() - ExtendedActivityVocabulary.Offer -> TODO() - ExtendedActivityVocabulary.Question -> TODO() + ExtendedActivityVocabulary.Listen -> null + ExtendedActivityVocabulary.Move -> null + ExtendedActivityVocabulary.Offer -> null + ExtendedActivityVocabulary.Question -> null ExtendedActivityVocabulary.Reject -> p.codec.treeToValue(treeNode, Reject::class.java) - ExtendedActivityVocabulary.Read -> TODO() - ExtendedActivityVocabulary.Remove -> TODO() - ExtendedActivityVocabulary.TentativeReject -> TODO() - ExtendedActivityVocabulary.TentativeAccept -> TODO() - ExtendedActivityVocabulary.Travel -> TODO() + ExtendedActivityVocabulary.Read -> null + ExtendedActivityVocabulary.Remove -> null + ExtendedActivityVocabulary.TentativeReject -> null + ExtendedActivityVocabulary.TentativeAccept -> null + ExtendedActivityVocabulary.Travel -> null ExtendedActivityVocabulary.Undo -> p.codec.treeToValue(treeNode, Undo::class.java) - ExtendedActivityVocabulary.Update -> TODO() - ExtendedActivityVocabulary.View -> TODO() - ExtendedActivityVocabulary.Application -> TODO() - ExtendedActivityVocabulary.Group -> TODO() - ExtendedActivityVocabulary.Organization -> TODO() + ExtendedActivityVocabulary.Update -> null + ExtendedActivityVocabulary.View -> null + ExtendedActivityVocabulary.Application -> null + ExtendedActivityVocabulary.Group -> null + ExtendedActivityVocabulary.Organization -> null ExtendedActivityVocabulary.Person -> p.codec.treeToValue(treeNode, Person::class.java) - ExtendedActivityVocabulary.Service -> TODO() - ExtendedActivityVocabulary.Article -> TODO() - ExtendedActivityVocabulary.Audio -> TODO() + ExtendedActivityVocabulary.Service -> null + ExtendedActivityVocabulary.Article -> null + ExtendedActivityVocabulary.Audio -> null ExtendedActivityVocabulary.Document -> p.codec.treeToValue(treeNode, Document::class.java) - ExtendedActivityVocabulary.Event -> TODO() + ExtendedActivityVocabulary.Event -> null ExtendedActivityVocabulary.Image -> p.codec.treeToValue(treeNode, Image::class.java) - ExtendedActivityVocabulary.Page -> TODO() - ExtendedActivityVocabulary.Place -> TODO() - ExtendedActivityVocabulary.Profile -> TODO() - ExtendedActivityVocabulary.Relationship -> TODO() + ExtendedActivityVocabulary.Page -> null + ExtendedActivityVocabulary.Place -> null + ExtendedActivityVocabulary.Profile -> null + ExtendedActivityVocabulary.Relationship -> null ExtendedActivityVocabulary.Tombstone -> p.codec.treeToValue(treeNode, Tombstone::class.java) - ExtendedActivityVocabulary.Video -> TODO() - ExtendedActivityVocabulary.Mention -> TODO() + ExtendedActivityVocabulary.Video -> null + ExtendedActivityVocabulary.Mention -> null ExtendedActivityVocabulary.Emoji -> p.codec.treeToValue(treeNode, Emoji::class.java) null -> null } } else { - TODO() + return null } } }