diff --git a/feed-parsers/class-feed-parser-activitypub.php b/feed-parsers/class-feed-parser-activitypub.php index aba3908c..5ad3a570 100644 --- a/feed-parsers/class-feed-parser-activitypub.php +++ b/feed-parsers/class-feed-parser-activitypub.php @@ -1023,7 +1023,7 @@ private function handle_incoming_create( $activity ) { if ( ! isset( $attachment['type'] ) || ! isset( $attachment['mediaType'] ) ) { continue; } - if ( 'Document' !== $attachment['type'] ) { + if ( ! in_array( $attachment['type'], array( 'Document', 'Image' ), true ) ) { continue; } diff --git a/includes/class-feed.php b/includes/class-feed.php index 02f201e6..549a2f6b 100644 --- a/includes/class-feed.php +++ b/includes/class-feed.php @@ -631,6 +631,11 @@ public function process_incoming_feed_items( array $items, User_Feed $user_feed if ( empty( $old_post->$field ) || empty( $post_data[ $field ] ) ) { continue; } + if ( 'post_content' === $field && $old_post->$field !== $post_data[ $field ] ) { + $modified_post_data[ $field ] = $post_data[ $field ]; + break; + } + if ( wp_strip_all_tags( $old_post->$field ) !== wp_strip_all_tags( $post_data[ $field ] ) ) { $modified_post_data[ $field ] = $post_data[ $field ]; break; @@ -654,6 +659,7 @@ public function process_incoming_feed_items( array $items, User_Feed $user_feed if ( intval( $old_post->comment_count ) !== intval( $item->comment_count ) ) { $modified_post_data['comment_count'] = $item->comment_count; } + wp_update_post( $modified_post_data ); $modified_posts[] = $post_id; }