Better device present/absent handling by separating it from the status event.

This commit is contained in:
Simo Kinnunen
2014-02-03 19:42:20 +09:00
parent f432dc9fb9
commit 2086d7d439
9 changed files with 147 additions and 39 deletions

View File

@@ -16,6 +16,11 @@ define(['./module', 'lodash'], function(mod, _) {
$rootScope.$digest()
})
socket.on('device.absent', function(data) {
_.pull(groupService.members, data.serial)
$rootScope.$digest()
})
groupService.invite = function(requirements) {
socket.emit('group.invite', requirements)
}