]> git.mxchange.org Git - friendica.git/blobdiff - include/api.php
Fix the test data
[friendica.git] / include / api.php
index 9a1767d6ed4b0b12cfdc72ee4541378a4e22a46e..4aa4b21e29199e4a0c339cb884d94b251f2062fd 100644 (file)
@@ -2041,9 +2041,9 @@ function api_statuses_repeat($type)
        Logger::log('API: api_statuses_repeat: '.$id);
 
        $fields = ['uri-id', 'network', 'body', 'title', 'author-name', 'author-link', 'author-avatar', 'guid', 'created', 'plink'];
-       $item = Item::selectFirst($fields, ['id' => $id, 'private' => [Item::PUBLIC, Item::UNLISTED]]);
-
-       if (DBA::isResult($item) && $item['body'] != "") {
+       $item = Post::selectFirst($fields, ['id' => $id, 'private' => [Item::PUBLIC, Item::UNLISTED]]);
+       if (DBA::isResult($item) && !empty($item['body'])) {
                if (in_array($item['network'], [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::TWITTER])) {
                        if (!Item::performActivity($id, 'announce', local_user())) {
                                throw new InternalServerErrorException();