Merge pull request #14037 from MrPetovan/bug/warnings

Add expected field 'uri-id' in Mastodon\Statuses\Bookmark
This commit is contained in:
Michael Vogel 2024-03-24 20:57:20 +01:00 committed by GitHub
commit f78b0e7c51
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -21,7 +21,6 @@
namespace Friendica\Module\Api\Mastodon\Statuses;
use Friendica\Core\System;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\Item;
@ -54,7 +53,7 @@ class Bookmark extends BaseApi
if ($item['uid'] == 0) {
$stored = Item::storeForUserByUriId($item['uri-id'], $uid, ['post-reason' => Item::PR_ACTIVITY]);
if (!empty($stored)) {
$item = Post::selectFirst(['id', 'gravity'], ['id' => $stored]);
$item = Post::selectFirst(['id', 'uri-id', 'gravity'], ['id' => $stored]);
if (!DBA::isResult($item)) {
$this->logAndJsonError(404, $this->errorFactory->RecordNotFound());
}