forked from friendica/friendica-addons
Compare commits
2 commits
26eea26f95
...
0eff72fa03
Author | SHA1 | Date | |
---|---|---|---|
Hypolite Petovan | 0eff72fa03 | ||
Michael | 2306261ab2 |
|
@ -1506,6 +1506,10 @@ function bluesky_fetch_missing_post(string $uri, int $uid, int $fetch_uid, int $
|
||||||
}
|
}
|
||||||
|
|
||||||
$class = bluesky_get_uri_class($uri);
|
$class = bluesky_get_uri_class($uri);
|
||||||
|
if (empty($class)) {
|
||||||
|
return $fallback;
|
||||||
|
}
|
||||||
|
|
||||||
$fetch_uri = $class->uri;
|
$fetch_uri = $class->uri;
|
||||||
|
|
||||||
Logger::debug('Fetch missing post', ['level' => $level, 'uid' => $uid, 'uri' => $uri]);
|
Logger::debug('Fetch missing post', ['level' => $level, 'uid' => $uid, 'uri' => $uri]);
|
||||||
|
|
|
@ -614,7 +614,7 @@ function tumblr_send_legacy(array $b)
|
||||||
$params['data'] = [];
|
$params['data'] = [];
|
||||||
foreach ($media as $photo) {
|
foreach ($media as $photo) {
|
||||||
if ($photo['type'] == Post\Media::IMAGE) {
|
if ($photo['type'] == Post\Media::IMAGE) {
|
||||||
if (Network::isLocalLink($photo['url']) && ($data = Photo::getResourceData($photo['url']))) {
|
if (DI::baseUrl()->isLocalUrl($photo['url']) && ($data = Photo::getResourceData($photo['url']))) {
|
||||||
$photo = Photo::selectFirst([], ["`resource-id` = ? AND `scale` > ?", $data['guid'], 0]);
|
$photo = Photo::selectFirst([], ["`resource-id` = ? AND `scale` > ?", $data['guid'], 0]);
|
||||||
if (!empty($photo)) {
|
if (!empty($photo)) {
|
||||||
$params['data'][] = Photo::getImageDataForPhoto($photo);
|
$params['data'][] = Photo::getImageDataForPhoto($photo);
|
||||||
|
|
Loading…
Reference in a new issue