Merge pull request #12234 from HankG/fix-friendica-notification-seen-endpoint

Update Notify->iid to itemId for notification endpoint
This commit is contained in:
Hypolite Petovan 2022-11-22 00:32:44 -05:00 committed by GitHub
commit 9fb447fefd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,7 +65,7 @@ class Seen extends BaseApi
DI::notify()->save($Notify); DI::notify()->save($Notify);
if ($Notify->otype === Notification\ObjectType::ITEM) { if ($Notify->otype === Notification\ObjectType::ITEM) {
$item = Post::selectFirstForUser($uid, [], ['id' => $Notify->iid, 'uid' => $uid]); $item = Post::selectFirstForUser($uid, [], ['id' => $Notify->itemId, 'uid' => $uid]);
if (DBA::isResult($item)) { if (DBA::isResult($item)) {
// we found the item, return it to the user // we found the item, return it to the user
$ret = [DI::twitterStatus()->createFromUriId($item['uri-id'], $item['uid'], $include_entities)->toArray()]; $ret = [DI::twitterStatus()->createFromUriId($item['uri-id'], $item['uid'], $include_entities)->toArray()];