Update PushNotificationService

pull/6396/head
Daniel Supernault 9 months ago
parent 259d07ce74
commit 0c90ca133d
No known key found for this signature in database
GPG Key ID: 23740873EE6F76A1

@ -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;
}
}

Loading…
Cancel
Save