diff --git a/app/Services/PushNotificationService.php b/app/Services/PushNotificationService.php index 4ffeea8f8..34313d82f 100644 --- a/app/Services/PushNotificationService.php +++ b/app/Services/PushNotificationService.php @@ -4,14 +4,16 @@ namespace App\Services; use App\User; -class PushNotificationService { - - public const NOTIFY_TYPES = ['follow', 'like', 'mention', 'comment', 'reblog']; +class PushNotificationService +{ + public const NOTIFY_TYPES = ['follow', 'like', 'mention', 'comment', 'share']; public const PUSH_GATEWAY_VERSION = '1.0'; - public static function check($listId, $memberId) { + public static function check($listId, $memberId) + { $user = User::where('notify_enabled', true)->where('profile_id', $memberId)->first(); + return $user ? (bool) $user->{"notify_{$listId}"} : false; } }