laravel-echo
Advanced tools
Comparing version 0.0.25 to 0.0.26
@@ -317,16 +317,3 @@ var classCallCheck = function (instance, Constructor) { | ||
value: function connect() { | ||
var _this2 = this; | ||
var pusher = new Pusher(this.options.pusherKey, this.options); | ||
var url = (this.options.host ? this.options.host : '') + '/broadcasting/socket'; | ||
pusher.connection.bind('connected', function () { | ||
var request = new XMLHttpRequest(); | ||
request.open('POST', url, true); | ||
request.setRequestHeader('Content-Type', 'application/json'); | ||
request.setRequestHeader('X-CSRF-Token', _this2.csrfToken()); | ||
request.send(JSON.stringify({ | ||
"socket_id": pusher.connection.socket_id | ||
})); | ||
}); | ||
this.pusher = pusher; | ||
this.pusher = new Pusher(this.options.pusherKey, this.options); | ||
} | ||
@@ -364,9 +351,9 @@ }, { | ||
value: function leave(channel) { | ||
var _this3 = this; | ||
var _this2 = this; | ||
var channels = [channel, 'private-' + channel, 'presence-' + channel]; | ||
channels.forEach(function (channelName, index) { | ||
if (_this3.channels[channelName]) { | ||
_this3.unsubscribe(channelName); | ||
delete _this3.channels[channelName]; | ||
if (_this2.channels[channelName]) { | ||
_this2.unsubscribe(channelName); | ||
delete _this2.channels[channelName]; | ||
} | ||
@@ -530,2 +517,2 @@ }); | ||
export { Echo }; | ||
module.exports = Echo; |
{ | ||
"name": "laravel-echo", | ||
"version": "0.0.25", | ||
"version": "0.0.26", | ||
"description": "Laravel Echo library for beautiful Pusher integration", | ||
@@ -5,0 +5,0 @@ "main": "dist/echo.js", |
121363
2749