lint fixes
This commit is contained in:
parent
c2a19a175c
commit
60cf0889d0
1 changed files with 10 additions and 9 deletions
|
@ -179,7 +179,6 @@ class Friends_Feed_Parser_ActivityPub extends \Friends\Feed_Parser {
|
||||||
$item = new \Friends\Feed_Item(
|
$item = new \Friends\Feed_Item(
|
||||||
array(
|
array(
|
||||||
'permalink' => $object['url'],
|
'permalink' => $object['url'],
|
||||||
// 'title' => '',
|
|
||||||
'content' => $object['content'],
|
'content' => $object['content'],
|
||||||
'post_format' => $this->map_type_to_post_format( $object['type'] ),
|
'post_format' => $this->map_type_to_post_format( $object['type'] ),
|
||||||
'date' => $object['published'],
|
'date' => $object['published'],
|
||||||
|
@ -197,7 +196,7 @@ class Friends_Feed_Parser_ActivityPub extends \Friends\Feed_Parser {
|
||||||
* @return bool|WP_Error Whether the event was queued.
|
* @return bool|WP_Error Whether the event was queued.
|
||||||
*/
|
*/
|
||||||
public function queue_follow_user( \Friends\User_Feed $user_feed ) {
|
public function queue_follow_user( \Friends\User_Feed $user_feed ) {
|
||||||
if ( self::SLUG != $user_feed->get_parser() ) {
|
if ( self::SLUG !== $user_feed->get_parser() ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -246,7 +245,7 @@ class Friends_Feed_Parser_ActivityPub extends \Friends\Feed_Parser {
|
||||||
* @return bool|WP_Error Whether the event was queued.
|
* @return bool|WP_Error Whether the event was queued.
|
||||||
*/
|
*/
|
||||||
public function queue_unfollow_user( \Friends\User_Feed $user_feed ) {
|
public function queue_unfollow_user( \Friends\User_Feed $user_feed ) {
|
||||||
if ( self::SLUG != $user_feed->get_parser() ) {
|
if ( self::SLUG !== $user_feed->get_parser() ) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -281,12 +280,14 @@ class Friends_Feed_Parser_ActivityPub extends \Friends\Feed_Parser {
|
||||||
$activity->set_to( null );
|
$activity->set_to( null );
|
||||||
$activity->set_cc( null );
|
$activity->set_cc( null );
|
||||||
$activity->set_actor( $actor );
|
$activity->set_actor( $actor );
|
||||||
$activity->set_object( array(
|
$activity->set_object(
|
||||||
|
array(
|
||||||
'type' => 'Follow',
|
'type' => 'Follow',
|
||||||
'actor' => $actor,
|
'actor' => $actor,
|
||||||
'object' => $to,
|
'object' => $to,
|
||||||
'id' => $to,
|
'id' => $to,
|
||||||
) );
|
)
|
||||||
|
);
|
||||||
$activity->set_id( $actor . '#unfollow-' . \preg_replace( '~^https?://~', '', $to ) );
|
$activity->set_id( $actor . '#unfollow-' . \preg_replace( '~^https?://~', '', $to ) );
|
||||||
$activity = $activity->to_json();
|
$activity = $activity->to_json();
|
||||||
\Activitypub\safe_remote_post( $inbox, $activity, $user_id );
|
\Activitypub\safe_remote_post( $inbox, $activity, $user_id );
|
||||||
|
|
Loading…
Reference in a new issue