Built motion from commit 21186556.|2.6.19
[motion2.git] / server / services / routing / server / applications / close.js
index a4250fe..5786aad 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xefc1=['routing','../../rpc/smsInteraction','../../rpc/faxInteraction','../../rpc/whatsappInteraction','consequence','info','[%s][CLOSE]\x20reason\x20%s','format','YYYY-MM-DD\x20HH:mm:ss','system','channel','Interaction','update','interaction','then','[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!','catch','error','[%s][CLOSE]\x20%s','finally','stop','stringify','moment','../../../../config/logger'];(function(_0x5c449d,_0x54b48f){var _0x371d46=function(_0xbf860f){while(--_0xbf860f){_0x5c449d['push'](_0x5c449d['shift']());}};_0x371d46(++_0x54b48f);}(_0xefc1,0xee));var _0x1efc=function(_0x1d9aa0,_0x272488){_0x1d9aa0=_0x1d9aa0-0x0;var _0x226868=_0xefc1[_0x1d9aa0];return _0x226868;};'use strict';var moment=require(_0x1efc('0x0'));var logger=require(_0x1efc('0x1'))(_0x1efc('0x2'));var rpc={'chatInteraction':require('../../rpc/chatInteraction'),'openchannelInteraction':require('../../rpc/openchannelInteraction'),'smsInteraction':require(_0x1efc('0x3')),'mailInteraction':require('../../rpc/mailInteraction'),'faxInteraction':require(_0x1efc('0x4')),'whatsappInteraction':require(_0x1efc('0x5'))};exports[_0x1efc('0x6')]=function(_0x49541f,_0x501f1f,_0xb5bfb3,_0x7666b2){return function(_0x580e5f){try{logger[_0x1efc('0x7')](_0x1efc('0x8'),_0x49541f,_0x501f1f[0x0]);var _0x2bd7fe={'closed':0x1,'closedAt':moment()[_0x1efc('0x9')](_0x1efc('0xa')),'closeReason':_0x1efc('0xb'),'disposition':_0x501f1f[0x0]};if(rpc[_0x7666b2[_0x1efc('0xc')]+_0x1efc('0xd')]){rpc[_0x7666b2[_0x1efc('0xc')]+'Interaction'][_0x1efc('0xe')](_0x7666b2[_0x1efc('0xf')]['id'],_0x2bd7fe)[_0x1efc('0x10')](function(_0x4ede48){logger[_0x1efc('0x7')](_0x1efc('0x11'),_0x49541f,_0x7666b2['interaction']['id']);})[_0x1efc('0x12')](function(_0x690ec0){logger[_0x1efc('0x13')](_0x1efc('0x14'),_0x49541f,JSON['stringify'](_0x690ec0));})[_0x1efc('0x15')](function(){_0x580e5f[_0x1efc('0x16')]();});}}catch(_0x252a20){logger[_0x1efc('0x13')]('[%s][CLOSE]\x20%s',_0x49541f,JSON[_0x1efc('0x17')](_0x252a20));_0x580e5f[_0x1efc('0x16')]();}};};
\ No newline at end of file
+var _0xa685=['../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction','../../rpc/whatsappInteraction','format','YYYY-MM-DD\x20HH:mm:ss','system','channel','Interaction','update','interaction','then','info','[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!','error','stringify','stop','moment','../../../../config/logger','routing','../../rpc/chatInteraction','../../rpc/openchannelInteraction'];(function(_0x1cac7d,_0x587638){var _0x468636=function(_0x455ba1){while(--_0x455ba1){_0x1cac7d['push'](_0x1cac7d['shift']());}};_0x468636(++_0x587638);}(_0xa685,0xc1));var _0x5a68=function(_0x2a56ad,_0x2b94bf){_0x2a56ad=_0x2a56ad-0x0;var _0x425175=_0xa685[_0x2a56ad];return _0x425175;};'use strict';var moment=require(_0x5a68('0x0'));var logger=require(_0x5a68('0x1'))(_0x5a68('0x2'));var rpc={'chatInteraction':require(_0x5a68('0x3')),'openchannelInteraction':require(_0x5a68('0x4')),'smsInteraction':require(_0x5a68('0x5')),'mailInteraction':require(_0x5a68('0x6')),'faxInteraction':require(_0x5a68('0x7')),'whatsappInteraction':require(_0x5a68('0x8'))};exports['consequence']=function(_0x4dbbd6,_0x261ec0,_0x3f6a9d,_0x97b767){return function(_0xb81191){try{logger['info']('[%s][CLOSE]\x20reason\x20%s',_0x4dbbd6,_0x261ec0[0x0]);var _0x577683={'closed':0x1,'closedAt':moment()[_0x5a68('0x9')](_0x5a68('0xa')),'closeReason':_0x5a68('0xb'),'disposition':_0x261ec0[0x0]};if(rpc[_0x97b767[_0x5a68('0xc')]+_0x5a68('0xd')]){rpc[_0x97b767[_0x5a68('0xc')]+_0x5a68('0xd')][_0x5a68('0xe')](_0x97b767[_0x5a68('0xf')]['id'],_0x577683)[_0x5a68('0x10')](function(_0x5a3bd1){logger[_0x5a68('0x11')](_0x5a68('0x12'),_0x4dbbd6,_0x97b767[_0x5a68('0xf')]['id']);})['catch'](function(_0x5ed805){logger[_0x5a68('0x13')]('[%s][CLOSE]\x20%s',_0x4dbbd6,JSON[_0x5a68('0x14')](_0x5ed805));})['finally'](function(){_0xb81191['stop']();});}}catch(_0x260940){logger['error']('[%s][CLOSE]\x20%s',_0x4dbbd6,JSON[_0x5a68('0x14')](_0x260940));_0xb81191[_0x5a68('0x15')]();}};};
\ No newline at end of file