Set valid context for our extra fields (ref #1220) #142

Merged
dessalines merged 1 commits from apub-context into main 2020-11-27 20:28:54 +00:00
Owner
No description provided.
dessalines reviewed 2020-11-27 18:34:53 +00:00
@ -0,0 +11,4 @@
"stickied": "as:stickied",
"comments_enabled": {
"kind": "sc:Boolean",
"id": "pt:commentsEnabled"
Owner

What's this about here?

What's this about here?
Author
Owner

We use the commentsEnabled field for locked posts. The pt: probably stands for Peertube cause thats where I copied it from. Dont know if we need to define that, or change it to some Lemmy namespace.

We use the `commentsEnabled` field for locked posts. The `pt:` probably stands for Peertube cause thats where I copied it from. Dont know if we need to define that, or change it to some Lemmy namespace.
dessalines reviewed 2020-11-27 18:36:28 +00:00
@ -0,0 +5,4 @@
pub(crate) fn lemmy_context() -> Result<Vec<AnyBase>, LemmyError> {
let context_ext = AnyBase::from_arbitrary_json(json!(
{
"sc": "http://schema.org#",
Owner

Does this need to be https://lemmy.ml#schema or something

Does this need to be `https://lemmy.ml#schema` or something
Author
Owner

I copied it directly from the Peertube json:

curl -H "Accept: application/activity+json" https://peertube.social/videos/watch/2c8aa3bb-e13f-40ef-a397-01c9696a8d43 | jq

I copied it directly from the Peertube json: `curl -H "Accept: application/activity+json" https://peertube.social/videos/watch/2c8aa3bb-e13f-40ef-a397-01c9696a8d43 | jq`
Owner

Cool, looks good to me then.

Cool, looks good to me then.
dessalines merged commit 050ca88085 into main 2020-11-27 20:28:54 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: LemmyNet/lemmy#142
No description provided.