Built motion from commit (unavailable).|2.6.0
[motion2.git] / server / services / routing / server / applications / close.js
index 14f690f..896eb7e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x631c=['../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction','../../rpc/whatsappInteraction','info','[%s][CLOSE]\x20reason\x20%s','system','Interaction','channel','interaction','then','[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!','error','[%s][CLOSE]\x20%s','stringify','finally','stop','moment','../../../../config/logger'];(function(_0x2db441,_0x13a782){var _0x52892f=function(_0x14cd1d){while(--_0x14cd1d){_0x2db441['push'](_0x2db441['shift']());}};_0x52892f(++_0x13a782);}(_0x631c,0x1b6));var _0xc631=function(_0x31407d,_0x38d443){_0x31407d=_0x31407d-0x0;var _0x367e46=_0x631c[_0x31407d];return _0x367e46;};'use strict';var moment=require(_0xc631('0x0'));var logger=require(_0xc631('0x1'))('routing');var rpc={'chatInteraction':require(_0xc631('0x2')),'openchannelInteraction':require(_0xc631('0x3')),'smsInteraction':require('../../rpc/smsInteraction'),'mailInteraction':require(_0xc631('0x4')),'faxInteraction':require(_0xc631('0x5')),'whatsappInteraction':require(_0xc631('0x6'))};exports['consequence']=function(_0x17dc11,_0x34263c,_0x5221e6,_0x278ad2){return function(_0x556c29){try{logger[_0xc631('0x7')](_0xc631('0x8'),_0x17dc11,_0x34263c[0x0]);var _0x5605cb={'closed':0x1,'closedAt':moment()['format']('YYYY-MM-DD\x20HH:mm:ss'),'closeReason':_0xc631('0x9'),'disposition':_0x34263c[0x0]};if(rpc[_0x278ad2['channel']+_0xc631('0xa')]){rpc[_0x278ad2[_0xc631('0xb')]+_0xc631('0xa')]['update'](_0x278ad2[_0xc631('0xc')]['id'],_0x5605cb)[_0xc631('0xd')](function(_0x462987){logger[_0xc631('0x7')](_0xc631('0xe'),_0x17dc11,_0x278ad2[_0xc631('0xc')]['id']);})['catch'](function(_0x3a5efd){logger[_0xc631('0xf')](_0xc631('0x10'),_0x17dc11,JSON[_0xc631('0x11')](_0x3a5efd));})[_0xc631('0x12')](function(){_0x556c29['stop']();});}}catch(_0x241e39){logger[_0xc631('0xf')]('[%s][CLOSE]\x20%s',_0x17dc11,JSON[_0xc631('0x11')](_0x241e39));_0x556c29[_0xc631('0x13')]();}};};
\ No newline at end of file
+var _0x1fcc=['error','stringify','finally','stop','[%s][CLOSE]\x20%s','moment','../../../../config/logger','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction','../../rpc/whatsappInteraction','consequence','info','[%s][CLOSE]\x20reason\x20%s','format','YYYY-MM-DD\x20HH:mm:ss','channel','Interaction','interaction','then','[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!','catch'];(function(_0x566147,_0x4f500f){var _0x213c3b=function(_0x2cb922){while(--_0x2cb922){_0x566147['push'](_0x566147['shift']());}};_0x213c3b(++_0x4f500f);}(_0x1fcc,0x125));var _0xc1fc=function(_0x32c012,_0xe3c576){_0x32c012=_0x32c012-0x0;var _0x48562e=_0x1fcc[_0x32c012];return _0x48562e;};'use strict';var moment=require(_0xc1fc('0x0'));var logger=require(_0xc1fc('0x1'))('routing');var rpc={'chatInteraction':require(_0xc1fc('0x2')),'openchannelInteraction':require(_0xc1fc('0x3')),'smsInteraction':require(_0xc1fc('0x4')),'mailInteraction':require(_0xc1fc('0x5')),'faxInteraction':require(_0xc1fc('0x6')),'whatsappInteraction':require(_0xc1fc('0x7'))};exports[_0xc1fc('0x8')]=function(_0x51605f,_0x205d03,_0x2fe1fc,_0x26899d){return function(_0x4df2ae){try{logger[_0xc1fc('0x9')](_0xc1fc('0xa'),_0x51605f,_0x205d03[0x0]);var _0x5ae7b3={'closed':0x1,'closedAt':moment()[_0xc1fc('0xb')](_0xc1fc('0xc')),'closeReason':'system','disposition':_0x205d03[0x0]};if(rpc[_0x26899d[_0xc1fc('0xd')]+'Interaction']){rpc[_0x26899d[_0xc1fc('0xd')]+_0xc1fc('0xe')]['update'](_0x26899d[_0xc1fc('0xf')]['id'],_0x5ae7b3)[_0xc1fc('0x10')](function(_0x2a1426){logger[_0xc1fc('0x9')](_0xc1fc('0x11'),_0x51605f,_0x26899d['interaction']['id']);})[_0xc1fc('0x12')](function(_0x10d1d3){logger[_0xc1fc('0x13')]('[%s][CLOSE]\x20%s',_0x51605f,JSON[_0xc1fc('0x14')](_0x10d1d3));})[_0xc1fc('0x15')](function(){_0x4df2ae[_0xc1fc('0x16')]();});}}catch(_0x52b0bb){logger[_0xc1fc('0x13')](_0xc1fc('0x17'),_0x51605f,JSON[_0xc1fc('0x14')](_0x52b0bb));_0x4df2ae[_0xc1fc('0x16')]();}};};
\ No newline at end of file