Built motion from commit 08fb8613.|2.6.31
[motion2.git] / server / services / routing / server / applications / close.js
index 1ec3bf1..270d267 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x72bf=['stop','moment','../../../../config/logger','routing','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/faxInteraction','../../rpc/whatsappInteraction','consequence','info','[%s][CLOSE]\x20reason\x20%s','format','YYYY-MM-DD\x20HH:mm:ss','system','channel','Interaction','update','then','interaction','error','[%s][CLOSE]\x20%s','stringify'];(function(_0x5415e9,_0x9a53d8){var _0x1f695f=function(_0x29f0a2){while(--_0x29f0a2){_0x5415e9['push'](_0x5415e9['shift']());}};_0x1f695f(++_0x9a53d8);}(_0x72bf,0x11f));var _0xf72b=function(_0x194f06,_0x2133f5){_0x194f06=_0x194f06-0x0;var _0x3d6635=_0x72bf[_0x194f06];return _0x3d6635;};'use strict';var moment=require(_0xf72b('0x0'));var logger=require(_0xf72b('0x1'))(_0xf72b('0x2'));var rpc={'chatInteraction':require('../../rpc/chatInteraction'),'openchannelInteraction':require(_0xf72b('0x3')),'smsInteraction':require(_0xf72b('0x4')),'mailInteraction':require('../../rpc/mailInteraction'),'faxInteraction':require(_0xf72b('0x5')),'whatsappInteraction':require(_0xf72b('0x6'))};exports[_0xf72b('0x7')]=function(_0x851bb2,_0x5c7f55,_0x1b1ef8,_0x1314bc){return function(_0x2ee52f){try{logger[_0xf72b('0x8')](_0xf72b('0x9'),_0x851bb2,_0x5c7f55[0x0]);var _0x176c06={'closed':0x1,'closedAt':moment()[_0xf72b('0xa')](_0xf72b('0xb')),'closeReason':_0xf72b('0xc'),'disposition':_0x5c7f55[0x0]};if(rpc[_0x1314bc[_0xf72b('0xd')]+_0xf72b('0xe')]){rpc[_0x1314bc[_0xf72b('0xd')]+_0xf72b('0xe')][_0xf72b('0xf')](_0x1314bc['interaction']['id'],_0x176c06)[_0xf72b('0x10')](function(_0x171e8e){logger[_0xf72b('0x8')]('[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!',_0x851bb2,_0x1314bc[_0xf72b('0x11')]['id']);})['catch'](function(_0x522c5b){logger[_0xf72b('0x12')](_0xf72b('0x13'),_0x851bb2,JSON[_0xf72b('0x14')](_0x522c5b));})['finally'](function(){_0x2ee52f[_0xf72b('0x15')]();});}}catch(_0x4a4ebf){logger[_0xf72b('0x12')](_0xf72b('0x13'),_0x851bb2,JSON[_0xf72b('0x14')](_0x4a4ebf));_0x2ee52f[_0xf72b('0x15')]();}};};
\ No newline at end of file
+var _0xb7c0=['[%s][CLOSE]\x20reason\x20%s','format','YYYY-MM-DD\x20HH:mm:ss','system','channel','Interaction','update','then','[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!','interaction','catch','error','[%s][CLOSE]\x20%s','stringify','finally','stop','routing','../../rpc/chatInteraction','../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/whatsappInteraction','consequence','info'];(function(_0x389832,_0x10a4a9){var _0x59429e=function(_0x5f3562){while(--_0x5f3562){_0x389832['push'](_0x389832['shift']());}};_0x59429e(++_0x10a4a9);}(_0xb7c0,0x83));var _0x0b7c=function(_0x13f2ec,_0x407206){_0x13f2ec=_0x13f2ec-0x0;var _0x389ca9=_0xb7c0[_0x13f2ec];return _0x389ca9;};'use strict';var moment=require('moment');var logger=require('../../../../config/logger')(_0x0b7c('0x0'));var rpc={'chatInteraction':require(_0x0b7c('0x1')),'openchannelInteraction':require('../../rpc/openchannelInteraction'),'smsInteraction':require(_0x0b7c('0x2')),'mailInteraction':require(_0x0b7c('0x3')),'faxInteraction':require('../../rpc/faxInteraction'),'whatsappInteraction':require(_0x0b7c('0x4'))};exports[_0x0b7c('0x5')]=function(_0x51bcb8,_0xd588a6,_0x3175b3,_0x4a38c5){return function(_0x3d1938){try{logger[_0x0b7c('0x6')](_0x0b7c('0x7'),_0x51bcb8,_0xd588a6[0x0]);var _0x53a762={'closed':0x1,'closedAt':moment()[_0x0b7c('0x8')](_0x0b7c('0x9')),'closeReason':_0x0b7c('0xa'),'disposition':_0xd588a6[0x0]};if(rpc[_0x4a38c5[_0x0b7c('0xb')]+_0x0b7c('0xc')]){rpc[_0x4a38c5[_0x0b7c('0xb')]+'Interaction'][_0x0b7c('0xd')](_0x4a38c5['interaction']['id'],_0x53a762)[_0x0b7c('0xe')](function(_0x2654d9){logger[_0x0b7c('0x6')](_0x0b7c('0xf'),_0x51bcb8,_0x4a38c5[_0x0b7c('0x10')]['id']);})[_0x0b7c('0x11')](function(_0x4fa35c){logger[_0x0b7c('0x12')](_0x0b7c('0x13'),_0x51bcb8,JSON[_0x0b7c('0x14')](_0x4fa35c));})[_0x0b7c('0x15')](function(){_0x3d1938[_0x0b7c('0x16')]();});}}catch(_0x5aeecf){logger['error'](_0x0b7c('0x13'),_0x51bcb8,JSON[_0x0b7c('0x14')](_0x5aeecf));_0x3d1938[_0x0b7c('0x16')]();}};};
\ No newline at end of file