mirror of
https://github.com/friendica/friendica
synced 2024-11-18 19:03:40 +00:00
Ensure not to add the plink
This commit is contained in:
parent
2d6735a616
commit
1e29c6f705
1 changed files with 6 additions and 6 deletions
|
@ -223,8 +223,6 @@ class Plaintext
|
|||
unset($post['url']);
|
||||
}
|
||||
}
|
||||
} elseif ($link != '') {
|
||||
$complete_msg .= "\n" . $link;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -240,6 +238,12 @@ class Plaintext
|
|||
$limit = $limit - 23;
|
||||
}
|
||||
|
||||
if (!in_array($link, ['', $item['plink']]) && ($post['type'] != 'photo')) {
|
||||
$complete_msg .= "\n" . $link;
|
||||
}
|
||||
|
||||
$post['parts'] = self::getParts(trim($complete_msg), $limit);
|
||||
|
||||
if (iconv_strlen($msg, 'UTF-8') > $limit) {
|
||||
if (($post['type'] == 'text') && isset($post['url'])) {
|
||||
$post['url'] = $item['plink'];
|
||||
|
@ -255,10 +259,6 @@ class Plaintext
|
|||
}
|
||||
}
|
||||
|
||||
if ($limit > 0) {
|
||||
$post['parts'] = self::getParts(trim($complete_msg), $limit);
|
||||
}
|
||||
|
||||
$post['text'] = trim($msg);
|
||||
|
||||
return $post;
|
||||
|
|
Loading…
Reference in a new issue