X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fapi.php;h=11950f52f3cbf4d3a20cc05f2f4af1d77e8fc0c4;hb=7a2d5f6a8eea1babea3450af0f62f3f692f91348;hp=52f04d954d0a90db783a8feac4b817266d1971eb;hpb=47acb6a2786ea5854228501160dd22199e6c2748;p=friendica.git diff --git a/include/api.php b/include/api.php index 52f04d954d..11950f52f3 100644 --- a/include/api.php +++ b/include/api.php @@ -2193,11 +2193,14 @@ function api_statuses_mentions($type) (SELECT `uri-id` FROM `post-user-notification` WHERE `uid` = ? AND `notification-type` & ? != 0 ORDER BY `uri-id`) AND (`uid` = 0 OR (`uid` = ? AND NOT `global`)) AND `id` > ?"; - $condition = [GRAVITY_PARENT, GRAVITY_COMMENT, api_user(), - Post\UserNotification::NOTIF_EXPLICIT_TAGGED | Post\UserNotification::NOTIF_IMPLICIT_TAGGED | - Post\UserNotification::NOTIF_THREAD_COMMENT | Post\UserNotification::NOTIF_DIRECT_COMMENT | - Post\UserNotification::NOTIF_DIRECT_THREAD_COMMENT, - api_user(), $since_id]; + $condition = [ + GRAVITY_PARENT, GRAVITY_COMMENT, + api_user(), + Post\UserNotification::TYPE_EXPLICIT_TAGGED | Post\UserNotification::TYPE_IMPLICIT_TAGGED | + Post\UserNotification::TYPE_THREAD_COMMENT | Post\UserNotification::TYPE_DIRECT_COMMENT | + Post\UserNotification::TYPE_DIRECT_THREAD_COMMENT, + api_user(), $since_id, + ]; if ($max_id > 0) { $query .= " AND `id` <= ?"; @@ -5644,7 +5647,7 @@ function api_friendica_notification_seen($type) } if ($Notify->uriId) { - DI::dba()->update('notification', ['seen' => true], ['uid' => $Notify->uid, 'target-uri-id' => $Notify->uriId]); + DI::notification()->setAllSeenForUser($Notify->uid, ['target-uri-id' => $Notify->uriId]); } $Notify->setSeen();