Last active
March 11, 2022 15:17
-
-
Save hiranya911/3c401a9d9e64f5fa2b330c07fb12b423 to your computer and use it in GitHub Desktop.
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
| import firebase_admin | |
| from firebase_admin import messaging | |
| from firebase_admin import firestore | |
| firebase_admin.initialize_app() | |
| client = firestore.client() | |
| snapshot = client.collection('users').document('alice').get() | |
| data = snapshot.to_dict() | |
| msg = messaging.Message( | |
| topic=data['topicName'], | |
| notification=messaging.Notification( | |
| title='Hello from the other side', | |
| body='I must have called this proxy a thousand times' | |
| ) | |
| ) | |
| print(messaging.send(msg)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hi, what if it is javascript in client browser?