marcelothebuilder / koreShield

The master of all Openkore plugins.
GNU General Public License v3.0
10 stars 10 forks source link

push notification for android/iOS #2

Open iamtonysoft opened 6 years ago

iamtonysoft commented 6 years ago

i want to know how it works... i already register an account to https://api.pushover.net and also set the right token and user but still does not work or send notification when bot got an alert using koreShield.

marcelothebuilder commented 6 years ago

First, you need to create an "application": https://pushover.net/apps/build

Then, you will see your application page with a field "API Token/Key". That token must be associated with "token" key in the pushover subroutine post data.

Back to the main pushover page, find the section titled "Your User Key" and copy your user key to the "user" key, just below where you put the previous application key.

You can use the console command "ks_n" to send a test notification. Please report if it is still not functioning. Which Pushover client are you using? My setup is working fine with their android app

iamtonysoft commented 6 years ago

LWP::UserAgent->new()->post( 'https://api.pushover.net/1/messages.json' , [ "token" => 'a3x4gyvcd*********', "user" => 'uwxat1b3*********', "message" => $final_message, "title" => $reason, "priority" => 0, "sound" => $priority == -1 ? 'none' : $sound[$priority], "timestamp" => int(time) ]); this is the example of what i did... i am only using the 7 day trial period to test the application. i also both use the browser and android for notification but nothing got send to the pushover

anyway i am testing this out on iRO:RE i have only modify this code %server_name_lut and the rest are only for translating Portuguese to English. No major modification. I got it working but only this push notification is my prob.

iamtonysoft commented 6 years ago

Can i also get a screenshot of the actual message to the pushover so i can get an idea ? btw... Thanks you for this!

This is our group : https://discord.gg/C8prSBj This is our repo: https://github.com/PoringUniverse/iro-restart-repo we give credit to you :)