Hi, all:
Are there plans to update this for 2.0? The formatting in this one looks easier for users than the formatting in nodebb-plugin-btn-spoilers, so I would prefer to use this.
@AOKP OK, I've had a first crack at a nodebb-plugin-onesignal notifier. You can give it a try here.
https://github.com/CCob/nodebb-plugin-onesignal
Ignore the README, it was forked and modified from the pushbullet plugin and I haven't got around to updating the README and publishing on npm yet.
You need to populate your OneSignal app_id and API key within the admin section. You can get this from the OneSignal website under your applications Keys & Id
section
I haven't done the Android integration yet, but you can get your player_ids from the OneSignal site here
I have exposed a REST API for adding player id's at /api/me/onesignal/devices
. An authenticated POST
with either a valid cookie or bearer token from the nodebb-plugin-write-api will work with the following JSON body
{
"player_id" : "player-id-here"
}
Once this has been completed, notifications should work which you can test by going to the OneSignal settings within your profile.
Appreciate any feedback
I installed this plugin, moving the files to node_modules (I could not get through npm), and I activated the plugin, but I can not access, the following message appears
/admin/onesignal Not Found
You seem to have stumbled upon a page that does not exist. Return to the home page.
@Braulio-Cesar-Holtz-Ribeiro Did you access the onesignal admin via menu after login, or directly enter the url?
@CCob said in NodeBB WebView App v3:
Did you access the onesignal admin via menu after login, or directly enter the url?
Also does not appear in the menu, the plugin is only enabled.
@Braulio-Cesar-Holtz-Ribeiro said in NodeBB WebView App v3:
@CCob said in NodeBB WebView App v3:
Did you access the onesignal admin via menu after login, or directly enter the url?
Also does not appear in the menu, the plugin is only enabled.
Sounds like the plugin is not installed correctly. I noticed you said you copied into the node modules directory. I don't believe this will install dependencies. Try using npm link *path*
where path is a separate directory outside of NodeBBC where the plugin directory is
@Braulio-Cesar-Holtz-Ribeiro Also before you use npm link
make sure you remove the manually copied folder from node_modules first
@CCob I have run the npm link nodebb-plugin-onesignal- and the only response I have is "/opt/bitnami/nginx/html/node_modules/nodebb-plugin-onesignal -> /usr/lib/node_modules/nodebb-plugin-onesignal -> /opt/bitnami/nginx/html/nodebb-plugin-onesignal"
@Braulio-Cesar-Holtz-Ribeiro you have to do it in the nodebb
director.
@Braulio-Cesar-Holtz-Ribeiro As @PitaJ suggests, it needs to be run from the NodeBB directory. I also suggest you get the latest version of the plugin as I pushed a new version last night that is compatible with older nodejs engines.
Can I browse all nodebb forums with this app (playstore) or is it only for community.nodebb.org? Cool projekt BTW
Ok, but maybe we can add configuration to the app and in the future use it for private forums like Tapatalk
I made some tests, the plugin is installed in the forum and I configured the key and id of the application. On Android I tested OneSignal by sending manual messages (in their system) and received it normally.
The issue is that if I send the message from a user (test user for admin user), in the Android application logged in with the admin account, I do not get the message notification, I tried also responding to a post, as a normal interaction
Is there anything else necessary for the correct functioning of the notification plugin?
@Braulio-Cesar-Holtz-Ribeiro Did you use the REST api exposed by the plugin to add the playerid from one signal as explained in my original post?
@Braulio-Cesar-Holtz-Ribeiro The android app integration is not complete yet, so the automatic registration of the player_id wont work with the version @AOKP has compiled. Hence the need to manually populate player_id's using the REST endpoint exposed by nodebb-plugin-onesignal