]> git.mxchange.org Git - friendica-addons.git/commitdiff
Bluesky/Twitter: New parameter added for rhe picture creation
authorMichael <heluecht@pirati.ca>
Fri, 16 Feb 2024 02:29:12 +0000 (02:29 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 16 Feb 2024 02:29:12 +0000 (02:29 +0000)
bluesky/bluesky.php
twitter/twitter.php

index a2c85ad37a60d0ffd58ed7502873f5606adac3ed..fe1faab18cdd0d33d7cd8bb3588d69d5e1b6252d 100644 (file)
@@ -896,7 +896,7 @@ function bluesky_upload_blob(int $uid, array $photo): ?stdClass
        $retrial = Worker::getRetrial();
        $content = Photo::getImageForPhoto($photo);
 
-       $picture = new Image($content, $photo['type']);
+       $picture = new Image($content, $photo['type'], $photo['filename']);
        $height  = $picture->getHeight();
        $width   = $picture->getWidth();
        $size    = strlen($content);
index b01345b74959931fc7257890004afe58f3419fd5..11c163efc9a50025b2ce17b139488c4936df0da7 100644 (file)
@@ -308,7 +308,7 @@ function twitter_upload_image(int $uid, array $image, int $retrial)
 
        $picturedata = Photo::getImageForPhoto($photo);
 
-       $picture = new Image($picturedata, $photo['type']);
+       $picture = new Image($picturedata, $photo['type'], $photo['filename']);
        $height  = $picture->getHeight();
        $width   = $picture->getWidth();
        $size    = strlen($picturedata);