api: fix friendica/notification/seen
api call
Fix return item related to notification when notification is set as seen
This commit is contained in:
parent
6892e56b3e
commit
66b4730a70
|
@ -5635,7 +5635,7 @@ function api_friendica_notification_seen($type)
|
||||||
if ($note['otype']=='item') {
|
if ($note['otype']=='item') {
|
||||||
// would be really better with an ItemsManager and $im->getByID() :-P
|
// would be really better with an ItemsManager and $im->getByID() :-P
|
||||||
$item = Item::selectFirstForUser(api_user(), [], ['id' => $note['iid'], 'uid' => api_user()]);
|
$item = Item::selectFirstForUser(api_user(), [], ['id' => $note['iid'], 'uid' => api_user()]);
|
||||||
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 = api_format_items([$item], $user_info, false, $type);
|
$ret = api_format_items([$item], $user_info, false, $type);
|
||||||
$data = ['status' => $ret];
|
$data = ['status' => $ret];
|
||||||
|
|
Loading…
Reference in a new issue