1
0
Fork 0
forked from alemi/upub

fix: add sensitive to context since we use it

This commit is contained in:
əlemi 2024-05-01 21:21:26 +02:00
parent e0331751a4
commit b1e4c4e79b
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -15,10 +15,13 @@ pub trait LD {
impl LD for serde_json::Value {
fn ld_context(mut self) -> Self {
if let Some(obj) = self.as_object_mut() {
let mut ctx = serde_json::Map::new();
ctx.insert("sensitive".to_string(), serde_json::Value::String("as:sensitive".into()));
obj.insert(
"@context".to_string(),
serde_json::Value::Array(vec![
serde_json::Value::String("https://www.w3.org/ns/activitystreams".into())
serde_json::Value::String("https://www.w3.org/ns/activitystreams".into()),
serde_json::Value::Object(ctx),
]),
);
} else {