1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-23 16:24:29 +00:00

Update AP helpers

This commit is contained in:
Daniel Supernault 2022-12-02 02:30:19 -07:00
parent 1a695f8073
commit 9a89a2b751
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -496,7 +496,8 @@ class Helpers {
$status->in_reply_to_id === null &&
$status->reblog_of_id === null &&
in_array($status->type, ['photo', 'photo:album', 'video', 'video:album', 'photo:video:album']) &&
$status->created_at->gt(now()->subHours(config('instance.timeline.network.max_hours_old')))
$status->created_at->gt(now()->subHours(config('instance.timeline.network.max_hours_old'))) &&
(config('instance.hide_nsfw_on_public_feeds') == true ? $status->is_nsfw == false : true)
) {
NetworkTimelineService::add($status->id);
}
@ -544,7 +545,7 @@ class Helpers {
public static function getScope($activity, $url)
{
$id = isset($activity['id']) ? self::pluckval($activity['id']) : self::pluckval($url);
$url = isset($activity['url']) ? self::pluckval($activity['url']) : $id;
$url = isset($activity['url']) ? self::pluckval($activity['url']) : self::pluckval($id);
$urlDomain = parse_url($url, PHP_URL_HOST);
$scope = 'private';