mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 16:35:19 +00:00
Check early on and don't process ActivityPub items if we already have them and we are not updating them.
This commit is contained in:
parent
7539503fb0
commit
a17733d732
1 changed files with 11 additions and 2 deletions
|
@ -4167,8 +4167,17 @@ class Activity
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Save a lot of additional processing if we already have this item and we are not doing an update.
|
||||
// Mastodon does not supply an updated timestamp on polls, so we have to process them regardless.
|
||||
|
||||
$check = q("select edited from item where mid = '%s' and uid = %d limit 1",
|
||||
dbesc($item['mid']),
|
||||
intval($channel['channel_id'])
|
||||
);
|
||||
if ($check && $check[0]['edited'] <= $item['edited'] && $item['obj_type'] !== 'Question') {
|
||||
return;
|
||||
}
|
||||
|
||||
$is_system = Channel::is_system($channel['channel_id']);
|
||||
$is_child_node = false;
|
||||
$commentApproval = null;
|
||||
|
|
Loading…
Reference in a new issue