| @@ -40,15 +40,9 @@ | ||
| 40 | 40 | if ( empty( $url ) ) { |
| 41 | 41 | return; |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | - /* | |
| 45 | - * Dedupe on the Like activity ID (its source_id), not the liked object, so repeat | |
| 46 | - * deliveries stay idempotent even when a mangled author name defeats WordPress's own | |
| 47 | - * duplicate check. Match any status, so a like that was marked as spam or trashed | |
| 48 | - * still counts as seen. See https://github.com/Automattic/wordpress-activitypub/issues/3215. | |
| 49 | - */ | |
| 50 | - $exists = Comment::object_id_to_comment( \esc_url_raw( object_to_uri( $like ) ), array( 'status' => 'any' ) ); | |
| 44 | + $exists = Comment::object_id_to_comment( esc_url_raw( $url ) ); | |
| 51 | 45 | if ( $exists ) { |
| 52 | 46 | return; |
| 53 | 47 | } |
| 54 | 48 | |
| @@ -54,11 +48,11 @@ | ||
| 54 | 48 | |
| 55 | 49 | $success = false; |
| 56 | 50 | $result = Interactions::add_reaction( $like ); |
| 57 | 51 | |
| 58 | - if ( $result && ! \is_wp_error( $result ) ) { | |
| 52 | + if ( $result && ! is_wp_error( $result ) ) { | |
| 59 | 53 | $success = true; |
| 60 | - $result = \get_comment( $result ); | |
| 54 | + $result = get_comment( $result ); | |
| 61 | 55 | } |
| 62 | 56 | |
| 63 | 57 | /** |
| 64 | 58 | * Fires after an ActivityPub Like activity has been handled. |