fix: add sensitive to context since we use it
This commit is contained in:
parent
e0331751a4
commit
b1e4c4e79b
1 changed files with 4 additions and 1 deletions
|
@ -15,10 +15,13 @@ pub trait LD {
|
||||||
impl LD for serde_json::Value {
|
impl LD for serde_json::Value {
|
||||||
fn ld_context(mut self) -> Self {
|
fn ld_context(mut self) -> Self {
|
||||||
if let Some(obj) = self.as_object_mut() {
|
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(
|
obj.insert(
|
||||||
"@context".to_string(),
|
"@context".to_string(),
|
||||||
serde_json::Value::Array(vec![
|
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 {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue