]> git.mxchange.org Git - friendica.git/commitdiff
Proxify the media url
authorMichael <heluecht@pirati.ca>
Fri, 11 Jun 2021 03:51:11 +0000 (03:51 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 11 Jun 2021 03:51:11 +0000 (03:51 +0000)
src/Factory/Api/Mastodon/Attachment.php

index f7c0328f942ad0c4011bef610a52fcb32c7d9392..f039c1a2332440d7497b0d144c731ce777899db3 100644 (file)
@@ -86,8 +86,8 @@ class Attachment extends BaseFactory
                                        $preview = Proxy::proxifyUrl($attachment['url'], false, Proxy::SIZE_SMALL);
                                }
                        } else {
-                               $url = $attachment['url'];
-                               $preview = $attachment['preview'] ?? '';
+                               $url = Proxy::proxifyUrl($attachment['url']);
+                               $preview = Proxy::proxifyUrl($attachment['preview'] ?? '');
                        }
 
                        $object = new \Friendica\Object\Api\Mastodon\Attachment($attachment, $type, $url, $preview, $remote);