From: Michael Date: Mon, 27 Sep 2021 20:29:11 +0000 (+0000) Subject: Issue 10772: Avoid duplicated links to Twitter X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8ed6469fb96fcd68fb3e7008a6d42dc6ee4337dc;p=friendica-addons.git Issue 10772: Avoid duplicated links to Twitter --- diff --git a/twitter/twitter.php b/twitter/twitter.php index 45f8fe13..66eb315a 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -680,7 +680,7 @@ function twitter_post_hook(App $a, array &$b) } // Add the link to the body if the type isn't a photo or there are more than 4 images in the post - if (!empty($msgarr['url']) && (($msgarr['type'] != 'photo') || empty($msgarr['images']) || (count($msgarr['images']) > 4))) { + if ((strpos($msg, $msgarr['url']) === false) && !empty($msgarr['url']) && (($msgarr['type'] != 'photo') || empty($msgarr['images']) || (count($msgarr['images']) > 4))) { $msg .= "\n" . $msgarr['url']; }