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 {
16
16
/*
17
17
* WEB API
18
18
*/
19
+ // TODO move to new event emitter logic
19
20
onMessage ( callback ) {
20
21
this . log . info ( 'Setting up onMessage callback' ) ;
21
22
const sub = this . _on ( 'FirestackReceiveNotification' , callback , FirestackMessagingEvt ) ;
22
23
return promisify ( ( ) => sub , FirestackMessaging ) ( sub ) ;
23
24
}
24
25
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
32
27
offMessage ( ) {
33
28
this . log . info ( 'Unlistening from onMessage (offMessage)' ) ;
34
- this . _off ( 'FirestackRefreshToken ' ) ;
29
+ this . _off ( 'FirestackReceiveNotification ' ) ;
35
30
}
36
31
37
32
offMessageReceived ( ...args ) {
You can’t perform that action at this time.
0 commit comments