mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-11 14:40:46 +00:00
Update AP Transformers, add commentsEnabled from PeerTube
This commit is contained in:
parent
d47edd8bed
commit
01931aea5f
2 changed files with 6 additions and 4 deletions
|
@ -31,9 +31,10 @@ class CreateNote extends Fractal\TransformerAbstract
|
||||||
'https://www.w3.org/ns/activitystreams',
|
'https://www.w3.org/ns/activitystreams',
|
||||||
'https://w3id.org/security/v1',
|
'https://w3id.org/security/v1',
|
||||||
[
|
[
|
||||||
|
'sc' => 'http://schema.org#',
|
||||||
'Hashtag' => 'as:Hashtag',
|
'Hashtag' => 'as:Hashtag',
|
||||||
'sensitive' => 'as:sensitive',
|
'sensitive' => 'as:sensitive',
|
||||||
'commentsDisabled' => 'as:commentsDisabled',
|
'commentsEnabled' => 'sc:Boolean',
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'id' => $status->permalink(),
|
'id' => $status->permalink(),
|
||||||
|
@ -63,7 +64,7 @@ class CreateNote extends Fractal\TransformerAbstract
|
||||||
];
|
];
|
||||||
})->toArray(),
|
})->toArray(),
|
||||||
'tag' => $tags,
|
'tag' => $tags,
|
||||||
'commentsDisabled' => (bool) $status->comments_disabled,
|
'commentsEnabled' => (bool) !$status->comments_disabled,
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,9 +31,10 @@ class Note extends Fractal\TransformerAbstract
|
||||||
'https://www.w3.org/ns/activitystreams',
|
'https://www.w3.org/ns/activitystreams',
|
||||||
'https://w3id.org/security/v1',
|
'https://w3id.org/security/v1',
|
||||||
[
|
[
|
||||||
|
'sc' => 'http://schema.org#',
|
||||||
'Hashtag' => 'as:Hashtag',
|
'Hashtag' => 'as:Hashtag',
|
||||||
'sensitive' => 'as:sensitive',
|
'sensitive' => 'as:sensitive',
|
||||||
'commentsDisabled' => 'as:commentsDisabled',
|
'commentsEnabled' => 'sc:Boolean',
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'id' => $status->url(),
|
'id' => $status->url(),
|
||||||
|
@ -56,7 +57,7 @@ class Note extends Fractal\TransformerAbstract
|
||||||
];
|
];
|
||||||
})->toArray(),
|
})->toArray(),
|
||||||
'tag' => $tags,
|
'tag' => $tags,
|
||||||
'commentsDisabled' => (bool) $status->comments_disabled,
|
'commentsEnabled' => (bool) !$status->comments_disabled,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue