Skip to content

Commit

Permalink
Try to fix Mastodon iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
akirk committed May 12, 2024
1 parent c9091b0 commit 4a69489
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions feed-parsers/class-feed-parser-activitypub.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public function get_mastodon_api_account( $id ) {
}

if ( isset( $meta['icon']['type'] ) && 'image' === strtolower( $meta['icon']['type'] ) ) {
$account->avatar['avatar'] = $meta['icon']['url'];
$account->avatar = $meta['icon']['url'];
} else {
$account->avatar = $placeholder_image;
}
Expand Down Expand Up @@ -292,14 +292,15 @@ public function mastodon_api_status_add_image_attachments( $status, $post_id, $r
'aspect' => $block['width'] / $block['height'],
);
} else {
continue;
$attachment->meta = array(
'width' => 0,
'height' => 0,
'size' => 0x0,
'aspect' => 1,
);
}
$original = $attachment->meta;
$attachment->meta['original'] = $original;
$attachment->description = '';
$status->media_attachments[] = $attachment;
}
Expand Down

0 comments on commit 4a69489

Please sign in to comment.