Added logging, fixed indentation, call it from DFRN as well
This commit is contained in:
parent
abf841ff79
commit
e435102089
2 changed files with 11 additions and 4 deletions
|
@ -3813,6 +3813,7 @@ class Item extends BaseObject
|
||||||
// Otherwhise try to find (and possibly fetch) the item via the link. This should work for Diaspora and ActivityPub posts
|
// Otherwhise try to find (and possibly fetch) the item via the link. This should work for Diaspora and ActivityPub posts
|
||||||
$id = self::fetchByLink($shared['link'], $uid);
|
$id = self::fetchByLink($shared['link'], $uid);
|
||||||
if (empty($id)) {
|
if (empty($id)) {
|
||||||
|
Logger::info('Original item not found', ['url' => $shared['link'], 'callstack' => System::callstack()]);
|
||||||
return $item;
|
return $item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3820,6 +3821,9 @@ class Item extends BaseObject
|
||||||
if (!DBA::isResult($shared_item)) {
|
if (!DBA::isResult($shared_item)) {
|
||||||
return $item;
|
return $item;
|
||||||
}
|
}
|
||||||
|
Logger::info('Got shared data from url', ['url' => $shared['link'], 'callstack' => System::callstack()]);
|
||||||
|
} else {
|
||||||
|
Logger::info('Got shared data from guid', ['guid' => $shared['guid'], 'callstack' => System::callstack()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($shared_item['title'])) {
|
if (!empty($shared_item['title'])) {
|
||||||
|
|
|
@ -2537,6 +2537,9 @@ class DFRN
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ensure to have the correct share data
|
||||||
|
$item = Item::addShareDataFromOriginal($item);
|
||||||
|
|
||||||
if ($entrytype == DFRN::REPLY_RC) {
|
if ($entrytype == DFRN::REPLY_RC) {
|
||||||
$item["wall"] = 1;
|
$item["wall"] = 1;
|
||||||
} elseif ($entrytype == DFRN::TOP_LEVEL) {
|
} elseif ($entrytype == DFRN::TOP_LEVEL) {
|
||||||
|
|
Loading…
Reference in a new issue