Merge pull request #13012 from annando/html-media-only-selected
Fix: Only add link preview for selected networks
This commit is contained in:
commit
7a55052ad2
1 changed files with 2 additions and 2 deletions
|
@ -635,7 +635,7 @@ class Media
|
|||
foreach ($matches[1] as $url) {
|
||||
Logger::info('Got page url (link without description)', ['uri-id' => $uriid, 'url' => $url]);
|
||||
$result = self::insert(['uri-id' => $uriid, 'type' => self::UNKNOWN, 'url' => $url], false, $network);
|
||||
if ($result && ($network == Protocol::DFRN)) {
|
||||
if ($result && !in_array($network, [Protocol::ACTIVITYPUB, Protocol::OSTATUS, Protocol::DIASPORA])) {
|
||||
self::revertHTMLType($uriid, $url, $fullbody);
|
||||
Logger::debug('Revert HTML type', ['uri-id' => $uriid, 'url' => $url]);
|
||||
} elseif ($result) {
|
||||
|
@ -651,7 +651,7 @@ class Media
|
|||
foreach ($matches[1] as $url) {
|
||||
Logger::info('Got page url (link with description)', ['uri-id' => $uriid, 'url' => $url]);
|
||||
$result = self::insert(['uri-id' => $uriid, 'type' => self::UNKNOWN, 'url' => $url], false, $network);
|
||||
if ($result && ($network == Protocol::DFRN)) {
|
||||
if ($result && !in_array($network, [Protocol::ACTIVITYPUB, Protocol::OSTATUS, Protocol::DIASPORA])) {
|
||||
self::revertHTMLType($uriid, $url, $fullbody);
|
||||
Logger::debug('Revert HTML type', ['uri-id' => $uriid, 'url' => $url]);
|
||||
} elseif ($result) {
|
||||
|
|
Loading…
Reference in a new issue