refactor function actor_is_event_source
All checks were successful
PHP Code Checker / PHP Code Checker (pull_request) Successful in 50s
PHPUnit / PHPUnit – PHP 7.4 (pull_request) Successful in 1m7s
PHPUnit / PHPUnit – PHP 8.0 (pull_request) Successful in 1m3s
PHPUnit / PHPUnit – PHP 8.1 (pull_request) Successful in 1m8s
PHPUnit / PHPUnit – PHP 8.2 (pull_request) Successful in 1m8s
PHPUnit / PHPUnit – PHP 8.3 (pull_request) Successful in 1m8s
PHPUnit / PHPUnit – PHP 8.4 (pull_request) Successful in 1m8s
All checks were successful
PHP Code Checker / PHP Code Checker (pull_request) Successful in 50s
PHPUnit / PHPUnit – PHP 7.4 (pull_request) Successful in 1m7s
PHPUnit / PHPUnit – PHP 8.0 (pull_request) Successful in 1m3s
PHPUnit / PHPUnit – PHP 8.1 (pull_request) Successful in 1m8s
PHPUnit / PHPUnit – PHP 8.2 (pull_request) Successful in 1m8s
PHPUnit / PHPUnit – PHP 8.3 (pull_request) Successful in 1m8s
PHPUnit / PHPUnit – PHP 8.4 (pull_request) Successful in 1m8s
This commit is contained in:
parent
b42fe590a1
commit
674552513b
1 changed files with 3 additions and 5 deletions
|
@ -482,12 +482,10 @@ class Event_Sources {
|
||||||
* @return bool True if the ActivityPub actor ID is followed, false otherwise.
|
* @return bool True if the ActivityPub actor ID is followed, false otherwise.
|
||||||
*/
|
*/
|
||||||
public static function actor_is_event_source( $actor_id ) {
|
public static function actor_is_event_source( $actor_id ) {
|
||||||
$event_sources = Event_Sources_Collection::get_event_sources();
|
$event_sources_ids = self::get_event_sources_ids();
|
||||||
foreach ( $event_sources as $event_source ) {
|
if ( in_array( $actor_id, $event_sources_ids, true ) ) {
|
||||||
if ( $actor_id === $event_source->get_id() ) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue