Built motion from commit (unavailable).|2.6.0
[motion2.git] / server / services / routing / server / applications / close.js
index ff16a53..9a1ebc6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-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
+var _0x8c46=['interaction','then','[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!','catch','error','[%s][CLOSE]\x20%s','stringify','stop','moment','../../rpc/chatInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction','../../rpc/whatsappInteraction','consequence','info','format','YYYY-MM-DD\x20HH:mm:ss','channel','Interaction'];(function(_0x5055f1,_0x3cbb87){var _0x28a9f0=function(_0x31433d){while(--_0x31433d){_0x5055f1['push'](_0x5055f1['shift']());}};_0x28a9f0(++_0x3cbb87);}(_0x8c46,0x171));var _0x68c4=function(_0x3dcc9d,_0x38ceb9){_0x3dcc9d=_0x3dcc9d-0x0;var _0x3b0d59=_0x8c46[_0x3dcc9d];return _0x3b0d59;};'use strict';var moment=require(_0x68c4('0x0'));var logger=require('../../../../config/logger')('routing');var rpc={'chatInteraction':require(_0x68c4('0x1')),'openchannelInteraction':require('../../rpc/openchannelInteraction'),'smsInteraction':require('../../rpc/smsInteraction'),'mailInteraction':require(_0x68c4('0x2')),'faxInteraction':require(_0x68c4('0x3')),'whatsappInteraction':require(_0x68c4('0x4'))};exports[_0x68c4('0x5')]=function(_0x287adb,_0x1243c6,_0x40ce21,_0x1516cf){return function(_0x3da9c3){try{logger[_0x68c4('0x6')]('[%s][CLOSE]\x20reason\x20%s',_0x287adb,_0x1243c6[0x0]);var _0x1754d7={'closed':0x1,'closedAt':moment()[_0x68c4('0x7')](_0x68c4('0x8')),'closeReason':'system','disposition':_0x1243c6[0x0]};if(rpc[_0x1516cf[_0x68c4('0x9')]+_0x68c4('0xa')]){rpc[_0x1516cf[_0x68c4('0x9')]+'Interaction']['update'](_0x1516cf[_0x68c4('0xb')]['id'],_0x1754d7)[_0x68c4('0xc')](function(_0x50b161){logger['info'](_0x68c4('0xd'),_0x287adb,_0x1516cf[_0x68c4('0xb')]['id']);})[_0x68c4('0xe')](function(_0x48783b){logger[_0x68c4('0xf')](_0x68c4('0x10'),_0x287adb,JSON[_0x68c4('0x11')](_0x48783b));})['finally'](function(){_0x3da9c3[_0x68c4('0x12')]();});}}catch(_0x14919c){logger[_0x68c4('0xf')]('[%s][CLOSE]\x20%s',_0x287adb,JSON[_0x68c4('0x11')](_0x14919c));_0x3da9c3[_0x68c4('0x12')]();}};};
\ No newline at end of file