Built motion from commit (unavailable).|2.5.0
[motion2.git] / server / services / routing / server / applications / close.js
index 039a04e..803fa4c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1f81=['../../rpc/faxInteraction','consequence','[%s][CLOSE]\x20reason\x20%s','format','YYYY-MM-DD\x20HH:mm:ss','system','channel','Interaction','update','interaction','info','[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!','catch','[%s][CLOSE]\x20%s','stringify','finally','error','moment','../../../../config/logger','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/mailInteraction'];(function(_0x13a6d8,_0x6189c){var _0x176743=function(_0x9a7fff){while(--_0x9a7fff){_0x13a6d8['push'](_0x13a6d8['shift']());}};_0x176743(++_0x6189c);}(_0x1f81,0xab));var _0x11f8=function(_0x95942,_0x85da80){_0x95942=_0x95942-0x0;var _0x6d7f81=_0x1f81[_0x95942];return _0x6d7f81;};'use strict';var moment=require(_0x11f8('0x0'));var logger=require(_0x11f8('0x1'))('routing');var rpc={'chatInteraction':require(_0x11f8('0x2')),'openchannelInteraction':require(_0x11f8('0x3')),'smsInteraction':require('../../rpc/smsInteraction'),'mailInteraction':require(_0x11f8('0x4')),'faxInteraction':require(_0x11f8('0x5'))};exports[_0x11f8('0x6')]=function(_0x454d02,_0x1c6cc7,_0x43f715,_0x1a16e9){return function(_0xe63071){try{logger['info'](_0x11f8('0x7'),_0x454d02,_0x1c6cc7[0x0]);var _0x8009d7={'closed':0x1,'closedAt':moment()[_0x11f8('0x8')](_0x11f8('0x9')),'closeReason':_0x11f8('0xa'),'disposition':_0x1c6cc7[0x0]};if(rpc[_0x1a16e9[_0x11f8('0xb')]+_0x11f8('0xc')]){rpc[_0x1a16e9[_0x11f8('0xb')]+_0x11f8('0xc')][_0x11f8('0xd')](_0x1a16e9[_0x11f8('0xe')]['id'],_0x8009d7)['then'](function(_0x3fa534){logger[_0x11f8('0xf')](_0x11f8('0x10'),_0x454d02,_0x1a16e9[_0x11f8('0xe')]['id']);})[_0x11f8('0x11')](function(_0x2ed8fc){logger['error'](_0x11f8('0x12'),_0x454d02,JSON[_0x11f8('0x13')](_0x2ed8fc));})[_0x11f8('0x14')](function(){_0xe63071['stop']();});}}catch(_0x3f2f3f){logger[_0x11f8('0x15')](_0x11f8('0x12'),_0x454d02,JSON[_0x11f8('0x13')](_0x3f2f3f));_0xe63071['stop']();}};};
\ No newline at end of file
+var _0xd668=['format','YYYY-MM-DD\x20HH:mm:ss','system','channel','Interaction','update','interaction','[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!','error','[%s][CLOSE]\x20%s','finally','stop','moment','../../../../config/logger','routing','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/faxInteraction','consequence','info','[%s][CLOSE]\x20reason\x20%s'];(function(_0x1caf30,_0x32d11c){var _0x358254=function(_0x30cb19){while(--_0x30cb19){_0x1caf30['push'](_0x1caf30['shift']());}};_0x358254(++_0x32d11c);}(_0xd668,0x108));var _0x8d66=function(_0x428662,_0x208c14){_0x428662=_0x428662-0x0;var _0x41f1a8=_0xd668[_0x428662];return _0x41f1a8;};'use strict';var moment=require(_0x8d66('0x0'));var logger=require(_0x8d66('0x1'))(_0x8d66('0x2'));var rpc={'chatInteraction':require(_0x8d66('0x3')),'openchannelInteraction':require(_0x8d66('0x4')),'smsInteraction':require('../../rpc/smsInteraction'),'mailInteraction':require('../../rpc/mailInteraction'),'faxInteraction':require(_0x8d66('0x5'))};exports[_0x8d66('0x6')]=function(_0x41b1e2,_0x28df74,_0x486c9b,_0x5dc979){return function(_0x1432e3){try{logger[_0x8d66('0x7')](_0x8d66('0x8'),_0x41b1e2,_0x28df74[0x0]);var _0x513cde={'closed':0x1,'closedAt':moment()[_0x8d66('0x9')](_0x8d66('0xa')),'closeReason':_0x8d66('0xb'),'disposition':_0x28df74[0x0]};if(rpc[_0x5dc979[_0x8d66('0xc')]+'Interaction']){rpc[_0x5dc979[_0x8d66('0xc')]+_0x8d66('0xd')][_0x8d66('0xe')](_0x5dc979[_0x8d66('0xf')]['id'],_0x513cde)['then'](function(_0x3b9168){logger[_0x8d66('0x7')](_0x8d66('0x10'),_0x41b1e2,_0x5dc979[_0x8d66('0xf')]['id']);})['catch'](function(_0x2bedf8){logger[_0x8d66('0x11')](_0x8d66('0x12'),_0x41b1e2,JSON['stringify'](_0x2bedf8));})[_0x8d66('0x13')](function(){_0x1432e3[_0x8d66('0x14')]();});}}catch(_0x34a2eb){logger[_0x8d66('0x11')]('[%s][CLOSE]\x20%s',_0x41b1e2,JSON['stringify'](_0x34a2eb));_0x1432e3['stop']();}};};
\ No newline at end of file