Skip to content

Commit 8274e99

Browse files
authored
Follow: Make sure Actor doesn't already exist before saving (#1904)
1 parent b1bef80 commit 8274e99

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

includes/class-cli.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ public function move( $args ) {
239239
* ## EXAMPLES
240240
*
241241
* $ wp activitypub follow https://example.com/@user
242+
* $ wp --user=pfefferle activitypub follow https://example.com/@user
242243
*
243244
* @synopsis <remote_user>
244245
*

includes/collection/class-actors.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ public static function fetch_remote_by_uri( $actor_uri ) {
561561
return $object;
562562
}
563563

564-
$post_id = self::create( $object );
564+
$post_id = self::upsert( $object );
565565

566566
if ( \is_wp_error( $post_id ) ) {
567567
return $post_id;

0 commit comments

Comments
 (0)