OneSignal integration / push notifications

סיכום מבוסס בינה מלאכותית

The discussion revolves around integrating OneSignal for push notifications in Discourse. Jeremie_Leroy initially attempts to set up OneSignal for web push notifications but encounters a 404 error for the SDK worker file, indicating a misconfiguration. pmusaraj clarifies that the discourse-onesignal plugin is intended for iOS notifications, not web push, and directs to the correct setup guide. Jeremie_Leroy acknowledges the mistake and confirms the goal was web push. Fausto_Dassenno inquires about the connection between OneSignal user IDs and Discourse users, noting that user tags are not appearing in OneSignal despite push notifications working. pmusaraj explains that the username is sent as a tag, referencing the plugin’s code, but Fausto_Dassenno observes that the tags are empty in the dashboard, raising a concern about the integration’s completeness.

Hi All,

i try to setup the onesignal service : https://onesignal.com/

so i did :

But i’m facing this error in the onesignal dashboard :
18

it fail to load this file : https://francais-a-londres.org/OneSignalSDKWorker.js?appId=“bliblaapinumber”

I guess i’m failing at uploading the sdk onesignal files. Any idea on how to do so ? on a digital ocean instance ?
@pmusaraj maybe you have an idea ?

Many thanks,

Did you setup OneSignal to send Web Push Notifications? The discourse-onesignal plugin should only be used for iOS notifications, the screen above with the “Service Worker 404” error does not look like an iOS issue.

So, if you’re trying to set up OneSignal for an iOS app, the first step is good (installing the discourse-onesignal plugin), but the second step should be to start setting up the app according to the instructions in the repository at GitHub - pmusaraj/discourse-mobile-single-site-app: Single-site app wrapper for a Discourse site. Supports Push Notifications via OneSignal. · GitHub

thank you @pmusaraj,

i was trying to use the web push notification. This is why it wasn’t working. thanks for your help.

Hi all,

what is the system that connects player-id from Onesignal with userid in Discourse?
I searched but on my users list in Onesignal there is no data about the discourse user and in discourse I was not able to find any reference to the Onesignal user.

Thx

F.

The username is sent to OneSignal as a tag (and the discourse plugin uses that as its target for push notifications).

https://github.com/pmusaraj/discourse-mobile-single-site-app/blob/master/js/Manager.js#L70

I see your point but my users have an empty tag on the Onesignal dashboard

but the push is working…