Merge pull request #10696 from annando/photo-type

Use post type "photo" for multiple photos as well
This commit is contained in:
Hypolite Petovan 2021-09-12 00:19:47 -04:00 committed by GitHub
commit e3a2f17f9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -327,8 +327,13 @@ class BBCode
}
}
} elseif (count($pictures) > 0) {
if (count($pictures) > 4) {
$post['type'] = 'link';
$post['url'] = $plink;
} else {
$post['type'] = 'photo';
}
$post['image'] = $pictures[0][2];
$post['text'] = $body;