]> git.mxchange.org Git - friendica.git/commitdiff
Check for a filled "event-id" field
authorMichael <heluecht@pirati.ca>
Sat, 5 Feb 2022 16:22:21 +0000 (16:22 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 5 Feb 2022 16:22:21 +0000 (16:22 +0000)
src/Protocol/ActivityPub/Processor.php

index 948a3983bc1d6bde8d9ff02a3792af0c715b3bb9..76f8cdb8507391eb15d719541d443407a26fa51f 100644 (file)
@@ -182,11 +182,8 @@ class Processor
                Item::update($item, ['uri' => $activity['id']]);
 
                if ($activity['object_type'] == 'as:Event') {
-                       $posts = Post::select(['event-id', 'uid'], ['uri' => $activity['id']]);
+                       $posts = Post::select(['event-id', 'uid'], ["`uri` = ? AND `event-id` > ?", $activity['id'], 0]);
                        while ($post = DBA::fetch($posts)) {
-                               if (empty($post['event-id'])) {
-                                       continue;
-                               }
                                self::updateEvent($post['event-id'], $activity);
                        }
                }