]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/Text/BBCode.php
Use post type "photo" for multiple photos as well
[friendica.git] / src / Content / Text / BBCode.php
index 5a2b966dd57c2ce6501522409e111e84d9c263ed..7319aeee85110cee282e69367aeb481ed52dc2c7 100644 (file)
@@ -327,8 +327,13 @@ class BBCode
                                                }
                                        }
                                } elseif (count($pictures) > 0) {
-                                       $post['type'] = 'link';
-                                       $post['url'] = $plink;
+                                       if (count($pictures) > 4) {
+                                               $post['type'] = 'link';
+                                               $post['url'] = $plink;
+                                       } else {
+                                               $post['type'] = 'photo';
+                                       }
+
                                        $post['image'] = $pictures[0][2];
                                        $post['text'] = $body;