fix(voice): refuse direct cctv toggles outside the shared lifecycle

This commit is contained in:
manjunath committed 2026-10-20 10:00:24 +05:30
1 parent b920d5f404
commit b48fcc42ae
4 files changed
+21 -10

No files matched your search

+2 -5
View File
@@ -1444,13 +1444,10 @@ export async function controlCctv(dataManager, args = {}, styleManager = null) {
}
if (action === 'enable' || action === 'disable') {
await dataManager.setEnabled('cctv', action === 'enable', {
origin: 'voice',
});
return {
ok: true,
ok: false,
action: 'control_cctv',
enabled: dataManager.isEnabled('cctv'),
error: 'Enable or disable CCTV through set_layer_visibility',
};
}
if (!dataManager.isEnabled('cctv')) {