finished notification
This commit is contained in:
Vendored
+6
-2
@@ -3,14 +3,18 @@ class SubscribePusher {
|
||||
this.subscribe = subscribe;
|
||||
this.event = event;
|
||||
this.apikey = apikey;
|
||||
this.pusher = new Pusher(this.apikey, {
|
||||
cluster: 'ap1', // Replace 'your_cluster' with the actual cluster of your Pusher app
|
||||
});
|
||||
}
|
||||
|
||||
channel_subscribe() {
|
||||
let channel = pusher.subscribe(this.subscribe);
|
||||
channel_subscribe(callback) {
|
||||
let channel = this.pusher.subscribe(this.subscribe);
|
||||
channel.bind(this.event, function(data){
|
||||
callback(data);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export default SubscribePusher;
|
||||
Reference in New Issue
Block a user