Skip to content

Commit e7c0526

Browse files
committed
check if it is an explicit "undo -> follow" action
1 parent 0dd079a commit e7c0526

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

includes/rest/class-inbox.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,9 @@ public static function handle_follow( $object, $user_id ) {
273273
* @param int $user_id The id of the local blog-user
274274
*/
275275
public static function handle_unfollow( $object, $user_id ) {
276-
\Activitypub\Peer\Followers::remove_follower( $object['actor'], $user_id );
276+
if ( isset( $object['object'] ) && isset( $object['object']['type'] ) && 'Follow' === $object['object']['type'] ) {
277+
\Activitypub\Peer\Followers::remove_follower( $object['actor'], $user_id );
278+
}
277279
}
278280

279281
/**

0 commit comments

Comments
 (0)