mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-21 05:15:17 +02:00
Allow group name change (#795)
* fix bug on email separator Signed-off-by: Denis barbaron <denis.barbaron@orange.com> * allow group name change Signed-off-by: Denis barbaron <denis.barbaron@orange.com> --------- Signed-off-by: Denis barbaron <denis.barbaron@orange.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Copyright © 2019 contains code contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0
|
||||
* Copyright © 2019-2024 contains code contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0
|
||||
**/
|
||||
|
||||
var http = require('http')
|
||||
@@ -133,6 +133,15 @@ module.exports = function(options) {
|
||||
disconnectSocket(true)
|
||||
})
|
||||
.on(wire.DeviceChangeMessage, function(channel, message) {
|
||||
if (user.groups.subscribed.indexOf(message.device.group.id) > -1) {
|
||||
socket.emit('device.change', {
|
||||
important: true
|
||||
, data: {
|
||||
serial: message.device.serial
|
||||
, group: message.device.group
|
||||
}
|
||||
})
|
||||
}
|
||||
if (user.groups.subscribed.indexOf(message.device.group.origin) > -1 ||
|
||||
user.groups.subscribed.indexOf(message.oldOriginGroupId) > -1) {
|
||||
socket.emit('user.settings.devices.' + message.action, message)
|
||||
|
||||
Reference in New Issue
Block a user