Skip to content

Commit

Permalink
Merge pull request #119 from akirk/fix-account-status
Browse files Browse the repository at this point in the history
Fix account statuses with a token and logged-in
  • Loading branch information
pfefferle committed Mar 18, 2024
2 parents 91657dc + 35a9272 commit 90b7b40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion includes/class-mastodon-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@ public function have_token_permission( $request ) {
public function logged_in_for_private_permission( $request ) {
$post_id = $request->get_param( 'post_id' );
if ( ! $post_id ) {
return false;
return true;
}

if ( get_post_status( $post_id ) !== 'publish' ) {
Expand Down
2 changes: 1 addition & 1 deletion includes/handler/class-status.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function register_hooks() {
* @param array $data Additional status data.
* @return array The status array
*/
public function api_status( ?array $status, int $object_id, array $data = array() ): array {
public function api_status( ?array $status, int $object_id, array $data = array() ): array|null {
$comment = get_comment( $object_id );

if ( $comment instanceof \WP_Comment ) {
Expand Down

0 comments on commit 90b7b40

Please sign in to comment.