r-martins / mautic-plugin-onesignal-web16
OneSignal Web SDK v16: use include_subscription_ids for web, and mark campaign push as failed when OneSignal returns errors or an empty id in JSON (including HTTP 200).
Package info
github.com/r-martins/mautic-plugin-onesignal-web16
Type:mautic-plugin
pkg:composer/r-martins/mautic-plugin-onesignal-web16
Requires
- php: >=8.2
- mautic/core-lib: ^7.0
This package is auto-updated.
Last update: 2026-04-23 02:11:03 UTC
README
Plugin for Mautic 7.x that avoids editing core for OneSignal web push (Web SDK v16 subscription IDs) and for treating OneSignal JSON errors in HTTP-200 responses as send failures in campaigns.
What it does
- For web (non-mobile) push, sends
include_subscription_idsinstead ofinclude_player_idsin the OneSignal REST request (aligned with subscription IDs from Web SDK v16 / Mauticpush_ids). - For mobile, keeps
include_player_ids. - If the OneSignal API returns HTTP 200 with a JSON
errorspayload or withidempty or null, the response is coerced to HTTP 422 so the defaultCampaignSubscriberdoes not record a false “delivered” outcome.
Requirements
- PHP >= 8.2
- Mautic 7.x (
mautic/core-lib^7.0)
Install (Composer, recommended for Packagist)
From the Mautic project root (Composer-based install):
composer require mtc/mautic-plugin-onesignal-web16 php bin/console mautic:plugins:reload php bin/console cache:clear
In the Mautic UI: Settings → Plugins, install/enable OnesignalWeb16 if necessary.
License
GPL-3.0-or-later (same family as Mautic core).