Skip to content

Commit 1905a8a

Browse files
committed
misc todo's
1 parent 36cfff2 commit 1905a8a

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

lib/modules/messaging.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff 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) {

0 commit comments

Comments
 (0)