Issue 11969: Simplified share

This commit is contained in:
Michael 2022-10-08 09:36:35 +00:00
parent b92e23273d
commit 4a37c978c2
3 changed files with 27 additions and 29 deletions

View file

@ -3671,7 +3671,15 @@ class Item
return $item['body'];
}
$id = self::fetchByLink($shared['link'] ?: $shared['message_id']);
$link = $shared['link'] ?: $shared['message_id'];
if (!empty($item['uid'])) {
$id = self::searchByLink($link, $item['uid']);
}
if (empty($id)) {
$id = self::fetchByLink($link);
}
Logger::debug('Fetched shared post', ['uri-id' => $item['uri-id'], 'id' => $id, 'author' => $shared['profile'], 'url' => $shared['link'], 'guid' => $shared['guid'], 'uri' => $shared['message_id'], 'callstack' => System::callstack()]);
if (!$id) {
return $item['body'];