From 846d0f21d582416160e953c56eedd55976ba0d3d Mon Sep 17 00:00:00 2001 From: alemi Date: Sun, 9 Jun 2024 18:42:35 +0200 Subject: [PATCH] fix(apb): dont put context extensions on collections --- apb/src/jsonld.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apb/src/jsonld.rs b/apb/src/jsonld.rs index 2391d748..334bd285 100644 --- a/apb/src/jsonld.rs +++ b/apb/src/jsonld.rs @@ -21,13 +21,18 @@ impl LD for serde_json::Value { ctx.insert("followingMe".to_string(), serde_json::Value::String("fe:followingMe".into())); ctx.insert("followedByMe".to_string(), serde_json::Value::String("fe:followedByMe".into())); }, - Ok(_) => { + Ok( + crate::ObjectType::Note + | crate::ObjectType::Article + | crate::ObjectType::Event + | crate::ObjectType::Document(crate::DocumentType::Page) // TODO why Document lemmyyyyyy + ) => { ctx.insert("fe".to_string(), serde_json::Value::String("https://ns.alemi.dev/as/fe/#".into())); ctx.insert("likedByMe".to_string(), serde_json::Value::String("fe:likedByMe".into())); ctx.insert("ostatus".to_string(), serde_json::Value::String("http://ostatus.org#".into())); ctx.insert("conversation".to_string(), serde_json::Value::String("ostatus:conversation".into())); }, - Err(_) => {}, + _ => {}, } obj.insert( "@context".to_string(),