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:
Denis Barbaron
2024-07-15 17:03:33 +02:00
committed by GitHub
parent 875730886d
commit cf56911e9f
8 changed files with 99 additions and 21 deletions

View File

@@ -1,5 +1,5 @@
/**
* Copyright © 2019 code initially contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0
* Copyright © 2019-2024 code initially contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0
**/
const wirerouter = require('../../../wire/router')
@@ -66,7 +66,6 @@ module.exports = function(push, pushdev, channelRouter) {
delete device.channel
delete device.owner
delete device.group.id
delete device.group.lifeTime
return device
}
@@ -117,7 +116,7 @@ module.exports = function(push, pushdev, channelRouter) {
, 'model'
, 'operator'
, 'manufacturer'
, {group: ['id', 'origin', 'originName', 'lifeTime']}
, {group: ['id', 'name', 'origin', 'originName', 'lifeTime', 'owner']}
, {provider: ['name']}
, {network: ['type', 'subtype']}
, {display: ['height', 'width']}
@@ -154,7 +153,9 @@ module.exports = function(push, pushdev, channelRouter) {
data.new_val.network.type !== data.old_val.network.type ||
data.new_val.network.subtype !== data.old_val.network.subtype
) ||
data.new_val.provider.name !== data.old_val.provider.name) {
data.new_val.provider.name !== data.old_val.provider.name ||
data.new_val.group.name !== data.old_val.group.name ||
data.new_val.group.originName !== data.old_val.group.originName) {
sendDeviceChange(data.new_val, data.old_val, 'updated')
}