From ff570d0d87435ff468717e85b31e04f761828383 Mon Sep 17 00:00:00 2001 From: alemi Date: Thu, 6 Jun 2024 20:24:10 +0200 Subject: [PATCH] fix: this is caught inside AP::object --- upub/core/src/traits/normalize.rs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/upub/core/src/traits/normalize.rs b/upub/core/src/traits/normalize.rs index afe4881d..1d39cb2d 100644 --- a/upub/core/src/traits/normalize.rs +++ b/upub/core/src/traits/normalize.rs @@ -25,15 +25,6 @@ impl Normalizer for crate::Context { async fn insert_object(&self, object: impl apb::Object, tx: &impl ConnectionTrait) -> Result { let oid = object.id()?.to_string(); let uid = object.attributed_to().id().str(); - let t = object.object_type()?; - if matches!(t, - apb::ObjectType::Activity(_) - | apb::ObjectType::Actor(_) - | apb::ObjectType::Collection(_) - | apb::ObjectType::Document(_) - ) { - return Err(apb::FieldErr("type").into()); - } let mut object_active_model = AP::object_q(&object)?; // make sure content only contains a safe subset of html