add groups feature

This commit is contained in:
Denis barbaron
2019-06-12 10:29:07 +02:00
parent 6fd750dad5
commit 7f5dc4c152
119 changed files with 12416 additions and 402 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)
})