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:
parent
4e99e40752
commit
657c66c1f1
1 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue