Skip to content

Commit

Permalink
fixed getAllDevices
Browse files Browse the repository at this point in the history
  • Loading branch information
Razvan Botea committed Apr 28, 2016
1 parent 5a5aabf commit f18ad89
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Subscription.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,17 +209,17 @@ Subscription.getAllDevices = function(appId, callback) {
devices[parsedDevice.volatile.server_name].push(parsedDevice.volatile.token);

} else if(parsedDevice.persistent) {
var queueName = parsedDevice.persistent[parsedDevice.persistent.type+'_transport'];
var queueName = parsedDevice.persistent.type+'_transport';

if (!devices[queueName])
devices[queueName] = [parsedDevice.volatile.token];
devices[queueName] = [parsedDevice.persistent.token];
else
devices[queueName].push(parsedDevice.volatile.token);
devices[queueName].push(parsedDevice.persistent.token);
}
}
c();
}, function() {
callback(devices);
callback(null, devices);
});
});
});
Expand Down

0 comments on commit f18ad89

Please sign in to comment.