Update twitter/twitter.php

Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
pull/1174/head
Michael Vogel 2021-09-28 05:22:01 +02:00 committed by GitHub
parent 8ed6469fb9
commit eed987f9e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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 ((strpos($msg, $msgarr['url']) === false) && !empty($msgarr['url']) && (($msgarr['type'] != 'photo') || empty($msgarr['images']) || (count($msgarr['images']) > 4))) {
if (!empty($msgarr['url']) && (strpos($msg, $msgarr['url']) === false) && (($msgarr['type'] != 'photo') || empty($msgarr['images']) || (count($msgarr['images']) > 4))) {
$msg .= "\n" . $msgarr['url'];
}