DragonByte Tech
Well-known member
At the moment, if you wish to add support for 3rd party push notification services like OneSignal, developers are forced to either hard-code support for only the built-in XF2 notifications, or manually render the alert template and strip HTML.
Both of these options are sub-optimal. Hard-coding support obviously leaves all 3rd party alerts out, and manually rendering the template leads to having to grab the content URL based on the
For that reason, I propose a new (optional) method be added to AbstractHandler;
The return signature should be an array, consisting of
This would be a great boon to the "push notifications for everyone" cause
Fillip
Both of these options are sub-optimal. Hard-coding support obviously leaves all 3rd party alerts out, and manually rendering the template leads to having to grab the content URL based on the
fauxBlockLink-blockLink
CSS class.For that reason, I propose a new (optional) method be added to AbstractHandler;
public function renderAlertInfo(UserAlert $alert, Entity $content = null)
The return signature should be an array, consisting of
url
and alert_text
so that the correct data could be fed to the 3rd party push notification service (or whatever other use cases).This would be a great boon to the "push notifications for everyone" cause
Fillip
Upvote
1