Skip to content

Commit 384fa16

Browse files
committed
remove old methods / misc cleanup
1 parent be896ba commit 384fa16

File tree

1 file changed

+3
-28
lines changed

1 file changed

+3
-28
lines changed

lib/modules/messaging.js

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const FirestackMessagingEvt = new NativeEventEmitter(FirestackMessaging);
1111
export default class Messaging extends Base {
1212
constructor(firestack, options = {}) {
1313
super(firestack, options);
14+
this.namespace = 'firestack:messaging';
1415
}
1516

1617
/*
@@ -33,11 +34,6 @@ export default class Messaging extends Base {
3334
return this.offMessage(...args);
3435
}
3536

36-
37-
get namespace() {
38-
return 'firestack:cloudMessaging'
39-
}
40-
4137
getToken() {
4238
this.log.info('getToken for cloudMessaging');
4339
return promisify('getToken', FirestackMessaging)();
@@ -72,13 +68,13 @@ export default class Messaging extends Base {
7268
}
7369

7470
subscribeToTopic(topic) {
75-
this.log.info('subscribeToTopic ' + topic);
71+
this.log.info(`subscribeToTopic ${topic}`);
7672
const finalTopic = `/topics/${topic}`;
7773
return promisify('subscribeToTopic', FirestackMessaging)(finalTopic);
7874
}
7975

8076
unsubscribeFromTopic(topic) {
81-
this.log.info('unsubscribeFromTopic ' + topic);
77+
this.log.info(`unsubscribeFromTopic ${topic}`);
8278
const finalTopic = `/topics/${topic}`;
8379
return promisify('unsubscribeFromTopic', FirestackMessaging)(finalTopic);
8480
}
@@ -96,27 +92,6 @@ export default class Messaging extends Base {
9692
return promisify(() => sub, FirestackMessaging)(sub);
9793
}
9894

99-
// old API
100-
/**
101-
* @deprecated
102-
* @param args
103-
* @returns {*}
104-
*/
105-
listenForReceiveNotification(...args) {
106-
console.warn('Firestack: listenForReceiveNotification is now deprecated, please use onMessage');
107-
return this.onMessage(...args);
108-
}
109-
110-
/**
111-
* @deprecated
112-
* @param args
113-
* @returns {*}
114-
*/
115-
unlistenForReceiveNotification(...args) {
116-
console.warn('Firestack: unlistenForReceiveNotification is now deprecated, please use offMessage');
117-
return this.offMessage(...args);
118-
}
119-
12095
listenForReceiveUpstreamSend(callback) {
12196
this.log.info('Setting up send callback');
12297
const sub = this._on('FirestackUpstreamSend', callback, FirestackMessagingEvt);

0 commit comments

Comments
 (0)