X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FProtocol%2FFeed.php;h=528800c1ee45c01af214ebd34726c76e70d39fb9;hb=4319136421ceee3ddc65bab8d3908d32974ee86b;hp=cc65efc1436df56808e7771e4d76f398347e4ff6;hpb=ba98242b9f393eecedbde117cea2a99b6fc87832;p=friendica.git diff --git a/src/Protocol/Feed.php b/src/Protocol/Feed.php index cc65efc143..528800c1ee 100644 --- a/src/Protocol/Feed.php +++ b/src/Protocol/Feed.php @@ -1,6 +1,6 @@ Post\Media::DOCUMENT, 'url' => $href, 'mimetype' => $type, 'size' => $length]; + $attachment = ['type' => Post\Media::UNKNOWN, 'url' => $href, 'mimetype' => $type, 'size' => $length]; + + $attachment = Post\Media::fetchAdditionalData($attachment); + + // By now we separate the visible media types (audio, video, image) from the rest + // In the future we should try to avoid the DOCUMENT type and only use the real one - but not in the RC phase. + if (!in_array($attachment['type'], [Post\Media::AUDIO, Post\Media::IMAGE, Post\Media::VIDEO])) { + $attachment['type'] = Post\Media::DOCUMENT; + } + $attachments[] = $attachment; } }