Created
November 4, 2017 13:00
-
-
Save webmaxru/28c96ae12b6eb05d92bf8df68bdf264f to your computer and use it in GitHub Desktop.
Notification payload format expected by NGSW from the backend
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "notification": { | |
| "title": "Ranjeet Kumar", | |
| "actions": [ | |
| { | |
| "action": "opentweet", | |
| "title": "Open tweet" | |
| } | |
| ], | |
| "body": "The latest The Top Javascript Blogs Daily! https://t.co/o3PSNkk9Di Thanks to @LifeWithKathy #makeyourownlane", | |
| "dir": "auto", | |
| "icon": "https://pbs.twimg.com/profile_images/854195961085734917/0X7AFONJ_normal.jpg", | |
| "badge": "https://pbs.twimg.com/profile_images/854195961085734917/0X7AFONJ_normal.jpg", | |
| "lang": "en", | |
| "renotify": true, | |
| "requireInteraction": true, | |
| "tag": 926796012340920300, | |
| "vibrate": [ | |
| 300, | |
| 100, | |
| 400 | |
| ], | |
| "data": { | |
| "url": "https://twitter.com/statuses/926796012340920321", | |
| "created_at": "Sat Nov 04 12:59:23 +0000 2017", | |
| "favorite_count": 0, | |
| "retweet_count": 0 | |
| } | |
| } | |
| } |
I have successfully sent the notifications, but when I click on the notifications it is unable to redirect the page. I have given my url in data.url But it is not able to redirect to that page. Do I need to change anything?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What does actions.action represents? what are the different option values for the action?