Created
June 26, 2019 04:09
-
-
Save e-lin/5e941866dd0e140b4293bf2d05a208d8 to your computer and use it in GitHub Desktop.
Storage upload trigger 2 - send notification to app
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
// sned a notification to the app | |
const payload = { | |
notification: { | |
title: 'Hellooo', | |
body: 'Is my kitty\'s bowl empty?', | |
click_action: 'com.hyperaware.catfeeder.ANSWER_PIC' | |
}, | |
data: { | |
pic_id: id | |
} | |
} | |
const response = await fcm.sendToTopic('pics', payload) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment