pixelfed/app/Services/PushNotificationService.php

18 lines
427 B
PHP
Raw Normal View History

2024-09-30 08:55:44 +00:00
<?php
namespace App\Services;
use App\User;
class PushNotificationService {
2024-09-30 08:55:44 +00:00
public const NOTIFY_TYPES = ['follow', 'like', 'mention', 'comment'];
public const PUSH_GATEWAY_VERSION = '1.0';
public static function check($listId, $memberId) {
$user = User::where('notify_enabled', true)->where('profile_id', $memberId)->first();
return $user ? (bool) $user->{"notify_{$listId}"} : false;
2024-09-30 08:55:44 +00:00
}
}