]> git.mxchange.org Git - friendica.git/commitdiff
Simplified code
authorMichael <heluecht@pirati.ca>
Sat, 24 Dec 2022 23:33:21 +0000 (23:33 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 24 Dec 2022 23:33:21 +0000 (23:33 +0000)
src/Protocol/ActivityPub/Processor.php

index 35bbc56233f9067a08ab47653231d917dc57f1e2..0390913be0ed974d868f91a8914aee0e8ca806ce 100644 (file)
@@ -1844,11 +1844,8 @@ class Processor
                        return;
                }
 
-               $status_ids = $activity['object_ids'];
-               array_shift($status_ids);
-
                $uri_ids = [];
-               foreach ($status_ids as $status_id) {
+               foreach ($activity['object_ids'] as $status_id) {
                        $post = Post::selectFirst(['uri-id'], ['uri' => $status_id]);
                        if (!empty($post['uri-id'])) {
                                $uri_ids[] = $post['uri-id'];
@@ -1858,7 +1855,7 @@ class Processor
                $report = DI::reportFactory()->createFromReportsRequest(null, $reporter_id, $account_id, $activity['content'], null, false, $uri_ids);
                DI::report()->save($report);
 
-               Logger::info('Stored report', ['reporter' => $reporter_id, 'account_id' => $account_id, 'comment' => $activity['content'], 'status_ids' => $status_ids]);
+               Logger::info('Stored report', ['reporter' => $reporter_id, 'account_id' => $account_id, 'comment' => $activity['content'], 'object_ids' => $activity['object_ids']]);
        }
 
        /**