Looks like refreshDeviceAndGroupPermissions should trigger a websocket update
I made it in BaseObjectResource update for now, I can send a pull request if you like it
//send for users that have new permission
if (entity instanceof Device) {
Device d = (Device)entity;
Position p=Context.getIdentityManager().getLastPosition(d.getId());
Context.getConnectionManager().updateDevice((Device)entity);
if (p!=null)
Context.getConnectionManager().updatePosition(p);
Context.getConnectionManager().updateDevice(
p.getDeviceId(), Device.STATUS_ONLINE, new Date());
}
This is a tricky one
The problem is that Websocket will not push a positionupdate if I change from group=1 to group=2 (thinking that since i dont see the device no need to update). Also doesn't push update when I change group back thinking again I don't have access to the device. I fake a positionupdate when I change the group via API to push the websocket update to everyone.
Any idea how to fix this? I didnt find anything obvious.