File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -16,22 +16,17 @@ export default class Messaging extends Base {
1616 /*
1717 * WEB API
1818 */
19+ // TODO move to new event emitter logic
1920 onMessage ( callback ) {
2021 this . log . info ( 'Setting up onMessage callback' ) ;
2122 const sub = this . _on ( 'FirestackReceiveNotification' , callback , FirestackMessagingEvt ) ;
2223 return promisify ( ( ) => sub , FirestackMessaging ) ( sub ) ;
2324 }
2425
25- // android & ios api dfgsdfs
26- onMessageReceived ( ...args ) {
27- return this . onMessage ( ...args ) ;
28- }
29-
30- // there is no 'off' for this on api's but it's needed here for react
31- // so followed the general 'off' / 'on' naming convention
26+ // TODO this is wrong - also there is no 'off' onMessage should return the unsubscribe function
3227 offMessage ( ) {
3328 this . log . info ( 'Unlistening from onMessage (offMessage)' ) ;
34- this . _off ( 'FirestackRefreshToken ' ) ;
29+ this . _off ( 'FirestackReceiveNotification ' ) ;
3530 }
3631
3732 offMessageReceived ( ...args ) {
You can’t perform that action at this time.
0 commit comments