Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
chrome.runtime.onConnect.addListener(function(port) {
var wamp = new Wampy(address, {
realm: 'bdgg',
onConnect: function() {
//console.log('wamp connected');
},
onError: function(e) { console.error('wamp error: ' + e); }
});
wamp.subscribe('bdgg.flair.refresh', {
onSuccess: function() {
//console.log('successfully subscribed');
},
onError: function(err) { console.error('subscription error: ' + err); },
onEvent: function(data) {
//console.log('refresh: ' + data);
postUsers(data.users);
}