diff --git a/composer.json b/composer.json index b040d85..244fcae 100644 --- a/composer.json +++ b/composer.json @@ -27,9 +27,9 @@ ], "require": { "php": "^8.0", - "berkayk/onesignal-laravel": "^1.0.0", - "illuminate/notifications": "5.*|^6.0|^7.0|^8.0|^9.0|^10.0", - "illuminate/support": "5.*|^6.0|^7.0|^8.0|^9.0|^10.0" + "berkayk/onesignal-laravel": "^1.0|^2.0", + "illuminate/notifications": "5.*|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "illuminate/support": "5.*|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0" }, "require-dev": { "mockery/mockery": "^1.3|^1.4", diff --git a/src/OneSignalPayloadFactory.php b/src/OneSignalPayloadFactory.php index 6e73a89..bb0fcbc 100644 --- a/src/OneSignalPayloadFactory.php +++ b/src/OneSignalPayloadFactory.php @@ -34,6 +34,7 @@ public static function make($notifiable, Notification $notification, $targeting) $payload['excluded_segments'] = collect($targeting['excluded_segments']); } elseif (static::isTargetingExternalUserIds($targeting)) { $payload['include_external_user_ids'] = collect($targeting['include_external_user_ids']); + $payload['channel_for_external_user_ids'] = 'push'; } else { $payload['include_player_ids'] = collect($targeting); }