Add support for Pushover

This commit is contained in:
James Cole
2024-12-09 07:34:01 +01:00
parent 94085ee940
commit c35ff3174a
10 changed files with 213 additions and 2 deletions

View File

@@ -66,6 +66,7 @@ use Illuminate\Support\Collection;
use Illuminate\Support\Str;
use Laravel\Passport\HasApiTokens;
use Laravel\Passport\Token;
use NotificationChannels\Pushover\PushoverReceiver;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
@@ -101,6 +102,12 @@ class User extends Authenticatable
throw new NotFoundHttpException();
}
public function routeNotificationForPushover()
{
return PushoverReceiver::withUserKey((string) config('services.pushover.user_token'))
->withApplicationToken((string) config('services.pushover.token'));
//return (string) config('services.pushover.token');
}
/**
* Link to accounts.