only reset obj cache if edited timestamp has changed

This commit is contained in:
Mario
2025-12-03 21:02:16 +00:00
parent 84d52a9ad1
commit 320a0c1b62

View File

@@ -3030,12 +3030,12 @@ class Activity {
);
if ($r) {
// Only update the object cache if there is no owner/author mismatch.
if ($r[0]['owner_xchan'] === $item['owner_xchan'] && $r[0]['author_xchan'] === $item['author_xchan']) {
ObjCache::Set($item['mid'], $act->data);
}
if ($item['edited'] > $r[0]['edited']) {
// Only update the object cache if there is no owner/author mismatch.
if ($r[0]['owner_xchan'] === $item['owner_xchan'] && $r[0]['author_xchan'] === $item['author_xchan']) {
ObjCache::Set($item['mid'], $act->data);
}
$item['id'] = $r[0]['id'];
$x = item_store_update($item, deliver: false);
}