mirror of
https://github.com/friendica/friendica
synced 2025-04-24 11:10:18 +00:00
Merge remote-tracking branch 'upstream/2021.09-rc' into user-contact
This commit is contained in:
commit
19c3e55ca8
22 changed files with 2030 additions and 1835 deletions
|
@ -659,6 +659,12 @@ class Item
|
|||
$params = ['order' => ['id' => false]];
|
||||
$parent = Post::selectFirst($fields, $condition, $params);
|
||||
|
||||
if (!DBA::isResult($parent) && $item['origin']) {
|
||||
$stored = Item::storeForUserByUriId($item['thr-parent-id'], $item['uid']);
|
||||
Logger::info('Stored thread parent item for user', ['uri-id' => $item['thr-parent-id'], 'uid' => $item['uid'], 'stored' => $stored]);
|
||||
$parent = Post::selectFirst($fields, $condition, $params);
|
||||
}
|
||||
|
||||
if (!DBA::isResult($parent)) {
|
||||
Logger::notice('item parent was not found - ignoring item', ['thr-parent-id' => $item['thr-parent-id'], 'uid' => $item['uid']]);
|
||||
return [];
|
||||
|
@ -673,6 +679,13 @@ class Item
|
|||
'uid' => $parent['uid']];
|
||||
$params = ['order' => ['id' => false]];
|
||||
$toplevel_parent = Post::selectFirst($fields, $condition, $params);
|
||||
|
||||
if (!DBA::isResult($toplevel_parent) && $item['origin']) {
|
||||
$stored = Item::storeForUserByUriId($item['parent-uri-id'], $item['uid']);
|
||||
Logger::info('Stored parent item for user', ['uri-id' => $item['parent-uri-id'], 'uid' => $item['uid'], 'stored' => $stored]);
|
||||
$toplevel_parent = Post::selectFirst($fields, $condition, $params);
|
||||
}
|
||||
|
||||
if (!DBA::isResult($toplevel_parent)) {
|
||||
Logger::notice('item top level parent was not found - ignoring item', ['parent-uri-id' => $parent['parent-uri-id'], 'uid' => $parent['uid']]);
|
||||
return [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue