Built motion from commit fe909640.|2.6.8
[motion2.git] / server / services / routing / server / applications / close.js
index da0543d..ddfff30 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x44ff=['[%s][CLOSE]\x20reason\x20%s','format','system','channel','Interaction','update','interaction','then','info','catch','error','[%s][CLOSE]\x20%s','stringify','finally','../../../../config/logger','routing','../../rpc/chatInteraction','../../rpc/whatsappInteraction','consequence'];(function(_0x595101,_0x49c834){var _0xe697be=function(_0x2c7be3){while(--_0x2c7be3){_0x595101['push'](_0x595101['shift']());}};_0xe697be(++_0x49c834);}(_0x44ff,0x1c3));var _0xf44f=function(_0x25292d,_0x238310){_0x25292d=_0x25292d-0x0;var _0x4623b5=_0x44ff[_0x25292d];return _0x4623b5;};'use strict';var moment=require('moment');var logger=require(_0xf44f('0x0'))(_0xf44f('0x1'));var rpc={'chatInteraction':require(_0xf44f('0x2')),'openchannelInteraction':require('../../rpc/openchannelInteraction'),'smsInteraction':require('../../rpc/smsInteraction'),'mailInteraction':require('../../rpc/mailInteraction'),'faxInteraction':require('../../rpc/faxInteraction'),'whatsappInteraction':require(_0xf44f('0x3'))};exports[_0xf44f('0x4')]=function(_0x53c286,_0x50a89b,_0x1e3227,_0x2ba2a5){return function(_0x24baf4){try{logger['info'](_0xf44f('0x5'),_0x53c286,_0x50a89b[0x0]);var _0x2dae46={'closed':0x1,'closedAt':moment()[_0xf44f('0x6')]('YYYY-MM-DD\x20HH:mm:ss'),'closeReason':_0xf44f('0x7'),'disposition':_0x50a89b[0x0]};if(rpc[_0x2ba2a5[_0xf44f('0x8')]+_0xf44f('0x9')]){rpc[_0x2ba2a5[_0xf44f('0x8')]+_0xf44f('0x9')][_0xf44f('0xa')](_0x2ba2a5[_0xf44f('0xb')]['id'],_0x2dae46)[_0xf44f('0xc')](function(_0x1acdc4){logger[_0xf44f('0xd')]('[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!',_0x53c286,_0x2ba2a5[_0xf44f('0xb')]['id']);})[_0xf44f('0xe')](function(_0x23b73a){logger[_0xf44f('0xf')](_0xf44f('0x10'),_0x53c286,JSON[_0xf44f('0x11')](_0x23b73a));})[_0xf44f('0x12')](function(){_0x24baf4['stop']();});}}catch(_0x5d2b86){logger[_0xf44f('0xf')]('[%s][CLOSE]\x20%s',_0x53c286,JSON['stringify'](_0x5d2b86));_0x24baf4['stop']();}};};
\ No newline at end of file
+var _0x1797=['stop','[%s][CLOSE]\x20%s','stringify','moment','routing','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/whatsappInteraction','consequence','info','[%s][CLOSE]\x20reason\x20%s','format','channel','Interaction','interaction','then','catch','error'];(function(_0x5c0bd4,_0x15ac5c){var _0x41924d=function(_0x2cc421){while(--_0x2cc421){_0x5c0bd4['push'](_0x5c0bd4['shift']());}};_0x41924d(++_0x15ac5c);}(_0x1797,0xb7));var _0x7179=function(_0x32d457,_0x1a39c9){_0x32d457=_0x32d457-0x0;var _0x338386=_0x1797[_0x32d457];return _0x338386;};'use strict';var moment=require(_0x7179('0x0'));var logger=require('../../../../config/logger')(_0x7179('0x1'));var rpc={'chatInteraction':require(_0x7179('0x2')),'openchannelInteraction':require(_0x7179('0x3')),'smsInteraction':require(_0x7179('0x4')),'mailInteraction':require(_0x7179('0x5')),'faxInteraction':require('../../rpc/faxInteraction'),'whatsappInteraction':require(_0x7179('0x6'))};exports[_0x7179('0x7')]=function(_0x4cb9c0,_0x444a4c,_0x343d0d,_0x2179e0){return function(_0x59d3ef){try{logger[_0x7179('0x8')](_0x7179('0x9'),_0x4cb9c0,_0x444a4c[0x0]);var _0x56033c={'closed':0x1,'closedAt':moment()[_0x7179('0xa')]('YYYY-MM-DD\x20HH:mm:ss'),'closeReason':'system','disposition':_0x444a4c[0x0]};if(rpc[_0x2179e0[_0x7179('0xb')]+_0x7179('0xc')]){rpc[_0x2179e0[_0x7179('0xb')]+'Interaction']['update'](_0x2179e0[_0x7179('0xd')]['id'],_0x56033c)[_0x7179('0xe')](function(_0x5dd150){logger[_0x7179('0x8')]('[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!',_0x4cb9c0,_0x2179e0[_0x7179('0xd')]['id']);})[_0x7179('0xf')](function(_0xf935ba){logger[_0x7179('0x10')]('[%s][CLOSE]\x20%s',_0x4cb9c0,JSON['stringify'](_0xf935ba));})['finally'](function(){_0x59d3ef[_0x7179('0x11')]();});}}catch(_0x373116){logger[_0x7179('0x10')](_0x7179('0x12'),_0x4cb9c0,JSON[_0x7179('0x13')](_0x373116));_0x59d3ef[_0x7179('0x11')]();}};};
\ No newline at end of file