From 8127fca07dabf10596413dcfd511331b5b46f682 Mon Sep 17 00:00:00 2001 From: Jean-Roch Maitre Date: Thu, 21 Jan 2016 14:27:47 -0800 Subject: [PATCH] UI-2009: Fix an issue with main faxbox --- submodules/strategy/strategy.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/submodules/strategy/strategy.js b/submodules/strategy/strategy.js index e26be0b2..6f79c795 100644 --- a/submodules/strategy/strategy.js +++ b/submodules/strategy/strategy.js @@ -2595,6 +2595,8 @@ define(function(require){ self.strategyGetAccount({ success: function(account) { + var email = account.contact && account.contact.technical && account.contact.technical.hasOwnProperty('email') ? account.contact.technical.email : undefined; + args.data = { name: account.name + self.i18n.active().strategy.faxing.nameExtension, caller_name: account.name, @@ -2606,17 +2608,21 @@ define(function(require){ notifications: { inbound: { email: { - send_to: account.contact.technical.email + send_to: email } }, outbound: { email: { - send_to: account.contact.technical.email + send_to: email } } } }; + if(!email) { + delete args.data.notifications; + } + self.strategyCreateFaxbox(args); } });