You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The config values for SUFFIX_COMMAND and SUFFIX_WRITE_STATE are empty string by default, this causes handleSubscribeEvent to add duplicate subscriptions. I think we can just can just make one subscription if getTopicFor value is the same?
function handleSubscribeEvent (req, res) {
// Subscribe to all events
subscriptions = [];
Object.keys(req.body.devices).forEach(function (property) {
req.body.devices[property].forEach(function (device) {
subscriptions.push(getTopicFor(device, property, TOPIC_COMMAND));
subscriptions.push(getTopicFor(device, property, TOPIC_WRITE_STATE));
});
});
The text was updated successfully, but these errors were encountered:
The config values for SUFFIX_COMMAND and SUFFIX_WRITE_STATE are empty string by default, this causes handleSubscribeEvent to add duplicate subscriptions. I think we can just can just make one subscription if getTopicFor value is the same?
The text was updated successfully, but these errors were encountered: