| @@ -54,8 +54,9 @@ | ||
| 54 | 54 | $data = [ |
| 55 | 55 | 'notifications' => $unreadNotifications, |
| 56 | 56 | 'unread_count' => Notification::byStatus('unread', get_current_user_id())->count() |
| 57 | 57 | ]; |
| 58 | + | |
| 58 | 59 | return apply_filters('fluent_community/unread_notifications_api_response', $data, $request->all()); |
| 59 | 60 | } |
| 60 | 61 | |
| 61 | 62 | public function markAllRead(Request $request) |
| @@ -88,9 +89,9 @@ | ||
| 88 | 89 | } |
| 89 | 90 | |
| 90 | 91 | public function markAsReadByFeedId(Request $request, $feedId) |
| 91 | 92 | { |
| 92 | - $feed = Feed::findOrfail($feedId); | |
| 93 | + $feed = Feed::withoutGlobalScopes()->findOrFail($feedId); | |
| 93 | 94 | |
| 94 | 95 | NotificationSubscriber::whereHas('notification', function ($query) use ($feed) { |
| 95 | 96 | return $query->where('feed_id', $feed->id); |
| 96 | 97 | }) |