1
0
Fork 0

The "share" handling is improved

This commit is contained in:
Michael 2022-10-25 06:37:23 +00:00
commit f54a886a5e
14 changed files with 74 additions and 111 deletions

View file

@ -123,11 +123,9 @@ function display_init(App $a)
function display_fetchauthor($item)
{
if (Diaspora::isReshare($item['body'], true)) {
$shared = Item::getShareArray($item);
if (!empty($shared['profile'])) {
$contact = Contact::getByURLForUser($shared['profile'], Session::getLocalUser());
}
$shared = Item::getShareArray($item);
if (empty($shared['comment']) && !empty($shared['guid']) && !empty($shared['profile'])) {
$contact = Contact::getByURLForUser($shared['profile'], Session::getLocalUser());
}
if (empty($contact)) {

View file

@ -42,7 +42,7 @@ function share_init(App $a) {
System::exit();
}
$shared = BBCode::fetchShareAttributes($item['body']);
$shared = Item::getShareArray($item);
if (empty($shared['comment']) && (!empty($shared['message_id']) || !empty($shared['link']))) {
$content = '[share]' . ($shared['message_id'] ?: $shared['link']) . '[/share]';
} else {