From 4b7eea0e169d352c1de8a336466bef3b5becc794 Mon Sep 17 00:00:00 2001 From: Jean-Roch Maitre Date: Tue, 20 Jun 2017 15:54:52 -0700 Subject: [PATCH] UI-2765: change level of setting for account setting of call recording --- submodules/users/users.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/submodules/users/users.js b/submodules/users/users.js index 157c78a..da178cb 100644 --- a/submodules/users/users.js +++ b/submodules/users/users.js @@ -2229,10 +2229,10 @@ define(function(require) { } } - if (currentAccount.hasOwnProperty('call_recording')) { - if (currentAccount.call_recording.hasOwnProperty(category)) { - if (currentAccount.call_recording[category].hasOwnProperty(direction) && currentAccount.call_recording[category][direction].hasOwnProperty('enabled')) { - formattedData.extra[category][direction].accountValue = currentAccount.call_recording[category][direction].enabled; + if (currentAccount.hasOwnProperty('call_recording') && currentAccount.call_recording.hasOwnProperty('account')) { + if (currentAccount.call_recording.account.hasOwnProperty(category)) { + if (currentAccount.call_recording.account[category].hasOwnProperty(direction) && currentAccount.call_recording.account[category][direction].hasOwnProperty('enabled')) { + formattedData.extra[category][direction].accountValue = currentAccount.call_recording.account[category][direction].enabled === true ? self.i18n.active().users.callRecording.toggleValues.on : self.i18n.active().users.callRecording.toggleValues.off; if (!found) { formattedData.extra[category][direction].enabled = 'default'; @@ -2407,7 +2407,8 @@ define(function(require) { $.extend(true, direction, { time_limit: formData.time_limit, url: formData.url, - format: formData.format + format: formData.format, + record_on_answer: true }); } });