mirror of https://github.com/LemmyNet/lemmy.git
Merge branch 'grishka_fix_ld_context'
commit
e726d1e184
|
@ -1,6 +1,7 @@
|
||||||
use activitystreams::{base::AnyBase, context};
|
use activitystreams::{base::AnyBase, context};
|
||||||
use lemmy_utils::LemmyError;
|
use lemmy_utils::LemmyError;
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
|
use url::Url;
|
||||||
|
|
||||||
pub(crate) fn lemmy_context() -> Result<Vec<AnyBase>, LemmyError> {
|
pub(crate) fn lemmy_context() -> Result<Vec<AnyBase>, LemmyError> {
|
||||||
let context_ext = AnyBase::from_arbitrary_json(json!(
|
let context_ext = AnyBase::from_arbitrary_json(json!(
|
||||||
|
@ -8,10 +9,15 @@ pub(crate) fn lemmy_context() -> Result<Vec<AnyBase>, LemmyError> {
|
||||||
"sc": "http://schema.org#",
|
"sc": "http://schema.org#",
|
||||||
"sensitive": "as:sensitive",
|
"sensitive": "as:sensitive",
|
||||||
"stickied": "as:stickied",
|
"stickied": "as:stickied",
|
||||||
|
"pt": "https://join.lemmy.ml#",
|
||||||
"comments_enabled": {
|
"comments_enabled": {
|
||||||
"kind": "sc:Boolean",
|
"type": "sc:Boolean",
|
||||||
"id": "pt:commentsEnabled"
|
"id": "pt:commentsEnabled"
|
||||||
}
|
}
|
||||||
}))?;
|
}))?;
|
||||||
Ok(vec![AnyBase::from(context()), context_ext])
|
Ok(vec![
|
||||||
|
AnyBase::from(context()),
|
||||||
|
context_ext,
|
||||||
|
AnyBase::from(Url::parse("https://w3id.org/security/v1")?),
|
||||||
|
])
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue