]> git.mxchange.org Git - friendica.git/commitdiff
Improved link comparism on attached links
authorMichael <heluecht@pirati.ca>
Thu, 29 Apr 2021 19:02:43 +0000 (19:02 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 29 Apr 2021 19:02:43 +0000 (19:02 +0000)
src/Model/Item.php

index 40d3150415f5d933dab9bca627c1d4823401f9fa..3516a57bdeba6a10fa453d9740fd728e24fb3bb3 100644 (file)
@@ -2838,7 +2838,13 @@ class Item
 
                if (!empty($attachments['link'])) {
                        foreach ($attachments['link'] as $link) {
-                               if (!in_array(strtolower($link['url']), $ignore_links)) {
+                               $found = false;
+                               foreach ($ignore_links as $ignore_link) {
+                                       if (Strings::compareLink($link['url'], $ignore_link)) {
+                                               $found = true;
+                                       }
+                               }
+                               if (!$found) {
                                        $attachment = $link;
                                }
                        }