2020-11-25 17:44:49 +00:00
|
|
|
use activitystreams::{base::AnyBase, context};
|
|
|
|
use lemmy_utils::LemmyError;
|
|
|
|
use serde_json::json;
|
|
|
|
|
|
|
|
pub(crate) fn lemmy_context() -> Result<Vec<AnyBase>, LemmyError> {
|
|
|
|
let context_ext = AnyBase::from_arbitrary_json(json!(
|
|
|
|
{
|
|
|
|
"sc": "http://schema.org#",
|
|
|
|
"sensitive": "as:sensitive",
|
|
|
|
"stickied": "as:stickied",
|
2021-03-21 01:03:53 +00:00
|
|
|
"pt": "https://join.lemmy.ml#",
|
2020-11-25 17:44:49 +00:00
|
|
|
"comments_enabled": {
|
2021-03-21 01:00:32 +00:00
|
|
|
"type": "sc:Boolean",
|
2021-03-02 16:12:45 +00:00
|
|
|
"id": "pt:commentsEnabled"
|
2020-11-25 17:44:49 +00:00
|
|
|
}
|
|
|
|
}))?;
|
2021-03-21 01:00:32 +00:00
|
|
|
Ok(vec![AnyBase::from(context()), context_ext, "https://w3id.org/security/v1"])
|
2020-11-25 17:44:49 +00:00
|
|
|
}
|