Built motion from commit (unavailable).|2.5.25
[motion2.git] / server / services / routing / server / applications / close.js
index c899b04..36fa0fc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x86f4=['channel','Interaction','update','interaction','then','[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!','catch','error','stringify','stop','moment','../../../../config/logger','routing','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/whatsappInteraction','consequence','info','[%s][CLOSE]\x20reason\x20%s','format','YYYY-MM-DD\x20HH:mm:ss','system'];(function(_0xeb7cdf,_0x36e989){var _0x37ef51=function(_0x328ac1){while(--_0x328ac1){_0xeb7cdf['push'](_0xeb7cdf['shift']());}};_0x37ef51(++_0x36e989);}(_0x86f4,0x18a));var _0x486f=function(_0x2d01cd,_0x3216db){_0x2d01cd=_0x2d01cd-0x0;var _0x56d2d2=_0x86f4[_0x2d01cd];return _0x56d2d2;};'use strict';var moment=require(_0x486f('0x0'));var logger=require(_0x486f('0x1'))(_0x486f('0x2'));var rpc={'chatInteraction':require(_0x486f('0x3')),'openchannelInteraction':require(_0x486f('0x4')),'smsInteraction':require(_0x486f('0x5')),'mailInteraction':require(_0x486f('0x6')),'faxInteraction':require('../../rpc/faxInteraction'),'whatsappInteraction':require(_0x486f('0x7'))};exports[_0x486f('0x8')]=function(_0x583729,_0xe32536,_0x1adb27,_0x39f767){return function(_0x207201){try{logger[_0x486f('0x9')](_0x486f('0xa'),_0x583729,_0xe32536[0x0]);var _0x5bfabc={'closed':0x1,'closedAt':moment()[_0x486f('0xb')](_0x486f('0xc')),'closeReason':_0x486f('0xd'),'disposition':_0xe32536[0x0]};if(rpc[_0x39f767[_0x486f('0xe')]+_0x486f('0xf')]){rpc[_0x39f767[_0x486f('0xe')]+_0x486f('0xf')][_0x486f('0x10')](_0x39f767[_0x486f('0x11')]['id'],_0x5bfabc)[_0x486f('0x12')](function(_0xb57b8c){logger[_0x486f('0x9')](_0x486f('0x13'),_0x583729,_0x39f767[_0x486f('0x11')]['id']);})[_0x486f('0x14')](function(_0x4312fb){logger[_0x486f('0x15')]('[%s][CLOSE]\x20%s',_0x583729,JSON[_0x486f('0x16')](_0x4312fb));})['finally'](function(){_0x207201[_0x486f('0x17')]();});}}catch(_0x2cc608){logger[_0x486f('0x15')]('[%s][CLOSE]\x20%s',_0x583729,JSON['stringify'](_0x2cc608));_0x207201[_0x486f('0x17')]();}};};
\ No newline at end of file
+var _0x03db=['format','YYYY-MM-DD\x20HH:mm:ss','system','channel','Interaction','update','catch','[%s][CLOSE]\x20%s','finally','stop','error','stringify','moment','../../../../config/logger','routing','../../rpc/chatInteraction','../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction','../../rpc/whatsappInteraction','consequence','info'];(function(_0x16ca44,_0x3a8002){var _0x4ee5bb=function(_0x4e5445){while(--_0x4e5445){_0x16ca44['push'](_0x16ca44['shift']());}};_0x4ee5bb(++_0x3a8002);}(_0x03db,0x156));var _0xb03d=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x03db[_0x3dd15e];return _0x231fd0;};'use strict';var moment=require(_0xb03d('0x0'));var logger=require(_0xb03d('0x1'))(_0xb03d('0x2'));var rpc={'chatInteraction':require(_0xb03d('0x3')),'openchannelInteraction':require('../../rpc/openchannelInteraction'),'smsInteraction':require(_0xb03d('0x4')),'mailInteraction':require(_0xb03d('0x5')),'faxInteraction':require(_0xb03d('0x6')),'whatsappInteraction':require(_0xb03d('0x7'))};exports[_0xb03d('0x8')]=function(_0x4b3fcd,_0x862dec,_0x1a01ba,_0x9a0f36){return function(_0x57a19b){try{logger[_0xb03d('0x9')]('[%s][CLOSE]\x20reason\x20%s',_0x4b3fcd,_0x862dec[0x0]);var _0x181291={'closed':0x1,'closedAt':moment()[_0xb03d('0xa')](_0xb03d('0xb')),'closeReason':_0xb03d('0xc'),'disposition':_0x862dec[0x0]};if(rpc[_0x9a0f36[_0xb03d('0xd')]+_0xb03d('0xe')]){rpc[_0x9a0f36[_0xb03d('0xd')]+'Interaction'][_0xb03d('0xf')](_0x9a0f36['interaction']['id'],_0x181291)['then'](function(_0x5d46f0){logger[_0xb03d('0x9')]('[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!',_0x4b3fcd,_0x9a0f36['interaction']['id']);})[_0xb03d('0x10')](function(_0x5cc310){logger['error'](_0xb03d('0x11'),_0x4b3fcd,JSON['stringify'](_0x5cc310));})[_0xb03d('0x12')](function(){_0x57a19b[_0xb03d('0x13')]();});}}catch(_0x127db1){logger[_0xb03d('0x14')](_0xb03d('0x11'),_0x4b3fcd,JSON[_0xb03d('0x15')](_0x127db1));_0x57a19b[_0xb03d('0x13')]();}};};
\ No newline at end of file