PluginProbe
ActivityPub / 9.2.1
ActivityPub v9.2.1
9.3.1 9.3.0 9.2.2 9.2.1 9.2.0 9.1.0 9.0.2 9.0.1 9.0.0 8.3.0 8.2.1 8.2.0 8.1.1 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.2.0 1.3.0 2.0.0 2.0.1 2.1.0 2.1.1 All 160 releases
← All changes | includes/handler/class-like.php +9 -3 8.2.19.2.1 View file →
@@ -40,9 +40,15 @@
40 40 if ( empty( $url ) ) {
41 41 return;
42 42 }
43 43
44 - $exists = Comment::object_id_to_comment( esc_url_raw( $url ) );
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' ) );
45 51 if ( $exists ) {
46 52 return;
47 53 }
48 54
@@ -48,11 +54,11 @@
48 54
49 55 $success = false;
50 56 $result = Interactions::add_reaction( $like );
51 57
52 - if ( $result && ! is_wp_error( $result ) ) {
58 + if ( $result && ! \is_wp_error( $result ) ) {
53 59 $success = true;
54 - $result = get_comment( $result );
60 + $result = \get_comment( $result );
55 61 }
56 62
57 63 /**
58 64 * Fires after an ActivityPub Like activity has been handled.