Skip to content

Commit

Permalink
Merge pull request #62 from toolstack/local-timeline
Browse files Browse the repository at this point in the history
Enable local/public timeline
  • Loading branch information
akirk authored Jan 10, 2024
2 parents fc8f01e + 506a482 commit ab0c4e4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion includes/class-mastodon-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -1589,7 +1589,17 @@ public function api_push_subscription( $request ) {
}

public function api_public_timeline( $request ) {
return array();
$args = $this->get_posts_query_args( $request );
if ( empty( $args ) ) {
return array();
}

// Only get the published posts for the public timeline.
$args['post_status'] = array( 'publish' );

$args = apply_filters( 'mastodon_api_timelines_args', $args, $request );

return $this->get_posts( $args, $request->get_param( 'min_id' ), $request->get_param( 'max_id' ) );
}

public function api_get_post_context( $request ) {
Expand Down

0 comments on commit ab0c4e4

Please sign in to comment.