1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 19:42:01 +02:00

Add socket.io with authentication and start rebuilding the device list.

This commit is contained in:
Simo Kinnunen 2014-01-31 03:37:55 +09:00
parent 176310cb6d
commit 9ed2524a7f
17 changed files with 285 additions and 14 deletions

View file

@ -346,6 +346,17 @@ module.exports = function(options) {
wireutil.makeJoinGroupMessage(options.serial)])
}
break
case wire.MessageType.UNGROUP:
var message = wire.UngroupMessage.decode(wrapper.message)
, groupChannel = message.channel
if (devutil.matchesRequirements(identity, message.requirements)) {
channels.unregister(groupChannel)
log.info('Unsubscribing from group channel "%s"', groupChannel)
sub.unsubscribe(groupChannel)
push.send([groupChannel,
wireutil.makeLeaveGroupMessage(options.serial)])
}
break
case wire.MessageType.SHELL_COMMAND:
var message = wire.ShellCommandMessage.decode(wrapper.message)
log.info('Running shell command "%s"', message.command.join(' '))