This commit is contained in:
Philipp Holzer 2019-10-25 00:10:20 +02:00
parent a83dfc11a0
commit 3897c74deb
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
21 changed files with 439 additions and 122 deletions

View file

@ -277,7 +277,7 @@ class BBCode extends BaseObject
if (preg_match_all("(\[url=(.*?)\]\s*\[img\](.*?)\[\/img\]\s*\[\/url\])ism", $body, $pictures, PREG_SET_ORDER)) {
if ((count($pictures) == 1) && !$has_title) {
if (!empty($item['object-type']) && ($item['object-type'] == Activity::OBJ_IMAGE)) {
if (!empty($item['object-type']) && ($item['object-type'] == Activity\ObjectType::IMAGE)) {
// Replace the preview picture with the real picture
$url = str_replace('-1.', '-0.', $pictures[0][2]);
$data = ['url' => $url, 'type' => 'photo'];