@@ -13,33 +13,33 @@ export class Setup extends React.Component {
1313 componentWillMount ( ) {
1414 const { firestack} = this . props ;
1515
16- firestack . cloudMessaging . getToken ( ) . then ( function ( token ) {
16+ firestack . messaging ( ) . getToken ( ) . then ( function ( token ) {
1717 console . log ( 'device token' , token ) ;
1818 } ) ;
1919
20- firestack . cloudMessaging . subscribeToTopic ( "setup_topic" ) . then ( function ( topic ) {
20+ firestack . messaging ( ) . subscribeToTopic ( "setup_topic" ) . then ( function ( topic ) {
2121 console . log ( 'Subscribe:' + topic ) ;
22- } ) . catch ( function ( err ) {
22+ } ) . catch ( function ( err ) {
2323 console . error ( err ) ;
2424 } ) ;
2525
26- firestack . cloudMessaging . onRemoteMessage ( notification => {
26+ firestack . messaging ( ) . onRemoteMessage ( notification => {
2727 console . log ( 'Received remote notification' , notification ) ;
2828 } )
2929
30- firestack . cloudMessaging . onLocalMessage ( notification => {
30+ firestack . messaging ( ) . onLocalMessage ( notification => {
3131 console . log ( 'Received local notification' , notification ) ;
3232 } )
3333
34- // firestack.cloudMessaging .listenForReceiveNotification((msg) =>{
34+ // firestack.messaging .listenForReceiveNotification((msg) =>{
3535 // console.log('Receive Messages:'+msg.data);
3636 // console.log('Receive Messages:'+msg.notification);
3737 // });
3838 }
3939
4040 _sendHi ( ) {
4141 const { firestack} = this . props ;
42- firestack . cloudMessaging . sendMessage ( {
42+ firestack . messaging ( ) . sendMessage ( {
4343 alertBody : "Some message" ,
4444 alertAction : "view"
4545 } )
0 commit comments