Merge pull request #1056 from denis99999/group-feature

Addition of a powerful system for device booking & partitioning
This commit is contained in:
Karol Wrótniak
2020-02-08 01:30:37 +01:00
committed by GitHub
124 changed files with 12442 additions and 395 deletions

View File

@@ -1,3 +1,7 @@
/**
* Copyright © 2019 contains code contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0
**/
var util = require('util')
var syrup = require('stf-syrup')
@@ -117,6 +121,7 @@ module.exports = syrup.serial()
if (plugin.isRunning()) {
activeServer.close()
activeServer.end()
activeServer = null
}
})
@@ -131,7 +136,7 @@ module.exports = syrup.serial()
}
lifecycle.observe(plugin.stop)
group.on('leave', plugin.end)
group.on('leave', plugin.stop)
router
.on(wire.ConnectStartMessage, function(channel) {
@@ -163,7 +168,7 @@ module.exports = syrup.serial()
})
.on(wire.ConnectStopMessage, function(channel) {
var reply = wireutil.reply(options.serial)
plugin.end()
plugin.stop()
.then(function() {
push.send([
channel
@@ -187,6 +192,5 @@ module.exports = syrup.serial()
})
})
return plugin.start()
.return(plugin)
return(plugin)
})