. */ declare(strict_types=1); namespace FireflyIII\Support\Notifications; /** * Class UrlValidator */ class UrlValidator { public static function isValidWebhookURL(string $url): bool { return str_starts_with($url, 'https://hooks.slack.com/services/') || str_starts_with($url, 'https://discord.com/api/webhooks/') || str_ends_with($url, '/slack'); } }