Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
TravisPusher.prototype.init = function (config, apiService) {
if (!config.key) {
// Set up a mock Pusher that ignores the expected methods.
return this.pusher = {
subscribe() {
return {
bind_global() {}
};
},
unsubscribe() {},
channel() {}
};
}
this.apiService = apiService;
Pusher.warn = this.warn.bind(this);
if (config.debug) {
Pusher.log = function (message) {
if (window.console && window.console.log) {
window.console.log(message);
}
};
}
let pusherConfig = {
encrypted: config.encrypted,
disableStats: true,
wsHost: config.host,
authorizer: function (channel, options) {
return {