Built motion from commit (unavailable).|2.6.0
[motion2.git] / server / services / routing / server / applications / close.js
index eed6fc9..ff16a53 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd819=['channel','Interaction','update','interaction','then','[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!','catch','error','[%s][CLOSE]\x20%s','finally','stringify','../../../../config/logger','routing','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/mailInteraction','../../rpc/whatsappInteraction','info','[%s][CLOSE]\x20reason\x20%s','format','YYYY-MM-DD\x20HH:mm:ss','system'];(function(_0x26fade,_0x27bddd){var _0xc649f4=function(_0xd1f861){while(--_0xd1f861){_0x26fade['push'](_0x26fade['shift']());}};_0xc649f4(++_0x27bddd);}(_0xd819,0x181));var _0x9d81=function(_0x149de2,_0x5cbeec){_0x149de2=_0x149de2-0x0;var _0x59ffeb=_0xd819[_0x149de2];return _0x59ffeb;};'use strict';var moment=require('moment');var logger=require(_0x9d81('0x0'))(_0x9d81('0x1'));var rpc={'chatInteraction':require(_0x9d81('0x2')),'openchannelInteraction':require(_0x9d81('0x3')),'smsInteraction':require('../../rpc/smsInteraction'),'mailInteraction':require(_0x9d81('0x4')),'faxInteraction':require('../../rpc/faxInteraction'),'whatsappInteraction':require(_0x9d81('0x5'))};exports['consequence']=function(_0x382cc1,_0x239432,_0x3a4899,_0x565411){return function(_0xfc583e){try{logger[_0x9d81('0x6')](_0x9d81('0x7'),_0x382cc1,_0x239432[0x0]);var _0x1e1329={'closed':0x1,'closedAt':moment()[_0x9d81('0x8')](_0x9d81('0x9')),'closeReason':_0x9d81('0xa'),'disposition':_0x239432[0x0]};if(rpc[_0x565411[_0x9d81('0xb')]+_0x9d81('0xc')]){rpc[_0x565411[_0x9d81('0xb')]+_0x9d81('0xc')][_0x9d81('0xd')](_0x565411[_0x9d81('0xe')]['id'],_0x1e1329)[_0x9d81('0xf')](function(_0x53951a){logger[_0x9d81('0x6')](_0x9d81('0x10'),_0x382cc1,_0x565411['interaction']['id']);})[_0x9d81('0x11')](function(_0x3fb6b5){logger[_0x9d81('0x12')](_0x9d81('0x13'),_0x382cc1,JSON['stringify'](_0x3fb6b5));})[_0x9d81('0x14')](function(){_0xfc583e['stop']();});}}catch(_0x228553){logger['error'](_0x9d81('0x13'),_0x382cc1,JSON[_0x9d81('0x15')](_0x228553));_0xfc583e['stop']();}};};
\ No newline at end of file
+var _0x6cfd=['../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/whatsappInteraction','consequence','info','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','stop','routing'];(function(_0x14936e,_0xa0b09f){var _0x3776f0=function(_0x18d482){while(--_0x18d482){_0x14936e['push'](_0x14936e['shift']());}};_0x3776f0(++_0xa0b09f);}(_0x6cfd,0x1b7));var _0xd6cf=function(_0x30210f,_0x58b53b){_0x30210f=_0x30210f-0x0;var _0x1a5dbe=_0x6cfd[_0x30210f];return _0x1a5dbe;};'use strict';var moment=require('moment');var logger=require('../../../../config/logger')(_0xd6cf('0x0'));var rpc={'chatInteraction':require(_0xd6cf('0x1')),'openchannelInteraction':require(_0xd6cf('0x2')),'smsInteraction':require(_0xd6cf('0x3')),'mailInteraction':require(_0xd6cf('0x4')),'faxInteraction':require('../../rpc/faxInteraction'),'whatsappInteraction':require(_0xd6cf('0x5'))};exports[_0xd6cf('0x6')]=function(_0x150cf6,_0x58c50e,_0x517713,_0x1681fc){return function(_0x5af324){try{logger[_0xd6cf('0x7')]('[%s][CLOSE]\x20reason\x20%s',_0x150cf6,_0x58c50e[0x0]);var _0x362863={'closed':0x1,'closedAt':moment()[_0xd6cf('0x8')](_0xd6cf('0x9')),'closeReason':_0xd6cf('0xa'),'disposition':_0x58c50e[0x0]};if(rpc[_0x1681fc[_0xd6cf('0xb')]+_0xd6cf('0xc')]){rpc[_0x1681fc[_0xd6cf('0xb')]+_0xd6cf('0xc')][_0xd6cf('0xd')](_0x1681fc['interaction']['id'],_0x362863)[_0xd6cf('0xe')](function(_0x527f5d){logger[_0xd6cf('0x7')](_0xd6cf('0xf'),_0x150cf6,_0x1681fc[_0xd6cf('0x10')]['id']);})[_0xd6cf('0x11')](function(_0x544885){logger[_0xd6cf('0x12')](_0xd6cf('0x13'),_0x150cf6,JSON['stringify'](_0x544885));})['finally'](function(){_0x5af324['stop']();});}}catch(_0x2919b3){logger['error']('[%s][CLOSE]\x20%s',_0x150cf6,JSON[_0xd6cf('0x14')](_0x2919b3));_0x5af324[_0xd6cf('0x15')]();}};};
\ No newline at end of file