fix warnings

This commit is contained in:
Django Doucet 2023-10-27 08:27:12 -06:00
parent 8a0e02b39f
commit 9af54707b9

View file

@ -342,13 +342,15 @@ function reply_recipients( $object_id, $post = null ) {
$recipients[] = \ActivityPub\url_to_webfinger( $ap_object['actor'] ); // Reply to Object actor! $recipients[] = \ActivityPub\url_to_webfinger( $ap_object['actor'] ); // Reply to Object actor!
if ( ! empty( $ap_object['object']['tag'] ) ) { // Reply to other tagged users. if ( ! empty( $ap_object['object']['tag'] ) ) { // Reply to other tagged users.
$author_post_url = \get_author_posts_url( $ap_object['user_id'] );// ignore self tag. if ( isset( $ap_object['user_id'] ) ) {
foreach ( $ap_object['object']['tag'] as $tag ) { // Other tagged users $author_post_url = \get_author_posts_url( $ap_object['user_id'] );// ignore self tag.
if ( $author_post_url === $tag['href'] ) { foreach ( $ap_object['object']['tag'] as $tag ) { // Other tagged users
continue; if ( $author_post_url === $tag['href'] ) {
} continue;
if ( in_array( 'Mention', $tag ) ) { }
$recipients[] = $tag['name']; if ( in_array( 'Mention', $tag ) ) {
$recipients[] = $tag['name'];
}
} }
} }
} }