mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-18 02:20:46 +00:00
17 lines
427 B
PHP
17 lines
427 B
PHP
<?php
|
|
|
|
namespace App\Services;
|
|
|
|
use App\User;
|
|
|
|
class PushNotificationService {
|
|
|
|
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;
|
|
}
|
|
}
|