Issue 12345: No link preview on DFRN posts
This commit is contained in:
@@ -711,7 +711,7 @@ class DFRN
|
||||
*/
|
||||
private static function getAttachment($doc, $root, array $item)
|
||||
{
|
||||
foreach (Post\Media::getByURIId($item['uri-id'], [Post\Media::DOCUMENT, Post\Media::TORRENT, Post\Media::UNKNOWN]) as $attachment) {
|
||||
foreach (Post\Media::getByURIId($item['uri-id'], [Post\Media::DOCUMENT, Post\Media::TORRENT]) as $attachment) {
|
||||
$attributes = ['rel' => 'enclosure',
|
||||
'href' => $attachment['url'],
|
||||
'type' => $attachment['mimetype']];
|
||||
|
||||
@@ -499,7 +499,7 @@ class Diaspora
|
||||
}
|
||||
|
||||
if (!($fields = self::validPosting($msg))) {
|
||||
Logger::warning('Invalid posting');
|
||||
Logger::warning('Invalid posting', ['msg' => $msg]);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -534,7 +534,7 @@ class Diaspora
|
||||
if (is_null($fields)) {
|
||||
$private = true;
|
||||
if (!($fields = self::validPosting($msg))) {
|
||||
Logger::warning('Invalid posting');
|
||||
Logger::warning('Invalid posting', ['msg' => $msg]);
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
@@ -3387,7 +3387,7 @@ class Diaspora
|
||||
$body = '### ' . html_entity_decode($title) . "\n\n" . $body;
|
||||
}
|
||||
|
||||
$attachments = Post\Media::getByURIId($item['uri-id'], [Post\Media::DOCUMENT, Post\Media::TORRENT, Post\Media::UNKNOWN]);
|
||||
$attachments = Post\Media::getByURIId($item['uri-id'], [Post\Media::DOCUMENT, Post\Media::TORRENT]);
|
||||
if (!empty($attachments)) {
|
||||
$body .= "\n[hr]\n";
|
||||
foreach ($attachments as $attachment) {
|
||||
|
||||
@@ -1186,7 +1186,7 @@ class OStatus
|
||||
}
|
||||
}
|
||||
|
||||
foreach (Post\Media::getByURIId($item['uri-id'], [Post\Media::DOCUMENT, Post\Media::TORRENT, Post\Media::UNKNOWN]) as $attachment) {
|
||||
foreach (Post\Media::getByURIId($item['uri-id'], [Post\Media::DOCUMENT, Post\Media::TORRENT]) as $attachment) {
|
||||
$attributes = ['rel' => 'enclosure',
|
||||
'href' => $attachment['url'],
|
||||
'type' => $attachment['mimetype']];
|
||||
|
||||
Reference in New Issue
Block a user