Skip to content

Commit

Permalink
revert change to accomodate non-updated ema
Browse files Browse the repository at this point in the history
  • Loading branch information
akirk committed Feb 8, 2025
1 parent db1d7c8 commit 9894a77
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion integrations/class-enable-mastodon-apps.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,19 @@ public static function init() {
add_filter( 'mastodon_api_get_posts_query_args', array( 'Friends\User', 'mastodon_api_get_posts_query_args' ) );
add_filter( 'mastodon_entity_relationship', array( 'Friends\User', 'mastodon_entity_relationship' ), 10, 2 );
add_action( 'mastodon_api_account_follow', array( get_called_class(), 'mastodon_api_account_follow' ), 10, 1 );
add_filter( 'mastodon_api_timelines_args', array( get_called_class(), 'mastodon_api_view_post_types' ) );
add_filter( 'mastodon_api_timelines_args', array( get_called_class(), 'mastodon_api_timelines_args' ) );
add_filter( 'mastodon_api_view_post_types', array( get_called_class(), 'mastodon_api_view_post_types' ) );
}

public static function mastodon_api_account_follow( $user_id ) {
return apply_filters( 'friends_create_and_follow', null, $user_id );
}

public static function mastodon_api_timelines_args( $args ) {
$args['post_type'][] = Friends::CPT;
return $args;
}

public static function mastodon_api_view_post_types( $view_post_types ) {
$view_post_types[] = Friends::CPT;
return $view_post_types;
Expand Down

0 comments on commit 9894a77

Please sign in to comment.