mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +00:00
Merge pull request #4896 from pixelfed/staging
Update AP helpers, fix sensitive bug
This commit is contained in:
commit
3a557d7ffc
2 changed files with 5 additions and 3 deletions
|
@ -95,6 +95,7 @@
|
|||
- Update TransformImports command, fix import service condition ([32c59f04](https://github.com/pixelfed/pixelfed/commit/32c59f04))
|
||||
- Update AP helpers, more efficently update post count ([7caed381](https://github.com/pixelfed/pixelfed/commit/7caed381))
|
||||
- Update AP helpers, refactor post count decrement logic ([b81ae577](https://github.com/pixelfed/pixelfed/commit/b81ae577))
|
||||
- Update AP helpers, fix sensitive bug ([00ed330c](https://github.com/pixelfed/pixelfed/commit/00ed330c))
|
||||
- ([](https://github.com/pixelfed/pixelfed/commit/))
|
||||
|
||||
## [v0.11.9 (2023-08-21)](https://github.com/pixelfed/pixelfed/compare/v0.11.8...v0.11.9)
|
||||
|
|
|
@ -548,10 +548,11 @@ class Helpers {
|
|||
|
||||
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;
|
||||
$urlDomain = parse_url($url, PHP_URL_HOST);
|
||||
if(!$url || !strlen($url)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$urlDomain = parse_url($url, PHP_URL_HOST);
|
||||
$cw = isset($activity['sensitive']) ? (bool) $activity['sensitive'] : false;
|
||||
|
||||
if(in_array($urlDomain, InstanceService::getNsfwDomains())) {
|
||||
|
|
Loading…
Reference in a new issue