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

Update AP Helpers, fix getSensitive and getScope missing parameters

This commit is contained in:
Daniel Supernault 2022-05-17 23:25:15 -06:00
parent 4e99e40752
commit 657c66c1f1
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -455,8 +455,8 @@ class Helpers {
return DB::transaction(function() use($url, $profile, $activity, $reply_to, $id) {
$ts = self::pluckval($activity['published']);
$scope = self::getScope($activity);
$cw = self::getSensitive($activity);
$scope = self::getScope($activity, $url);
$cw = self::getSensitive($activity, $url);
$pid = is_object($profile) ? $profile->id : (is_array($profile) ? $profile['id'] : null);
if(!$pid) {
@ -493,7 +493,7 @@ class Helpers {
});
}
public static function getSensitive($activity)
public static function getSensitive($activity, $url)
{
$id = isset($activity['id']) ? self::pluckval($activity['id']) : self::pluckval($url);
$url = isset($activity['url']) ? self::pluckval($activity['url']) : $id;
@ -527,7 +527,7 @@ class Helpers {
return $reply_to;
}
public static function getScope($activity)
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;