Built motion from commit b58257bb.|2.5.37
[motion2.git] / server / services / routing / server / applications / close.js
index d396600..b63b516 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd9bd=['[%s][CLOSE]\x20reason\x20%s','YYYY-MM-DD\x20HH:mm:ss','system','channel','Interaction','update','interaction','then','[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!','catch','error','stringify','[%s][CLOSE]\x20%s','stop','moment','routing','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction','../../rpc/whatsappInteraction','consequence','info'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0xd9bd,0xc6));var _0xdd9b=function(_0x40412a,_0xd7d49){_0x40412a=_0x40412a-0x0;var _0x369d36=_0xd9bd[_0x40412a];return _0x369d36;};'use strict';var moment=require(_0xdd9b('0x0'));var logger=require('../../../../config/logger')(_0xdd9b('0x1'));var rpc={'chatInteraction':require(_0xdd9b('0x2')),'openchannelInteraction':require(_0xdd9b('0x3')),'smsInteraction':require('../../rpc/smsInteraction'),'mailInteraction':require(_0xdd9b('0x4')),'faxInteraction':require(_0xdd9b('0x5')),'whatsappInteraction':require(_0xdd9b('0x6'))};exports[_0xdd9b('0x7')]=function(_0x5cf818,_0x524a29,_0x3b1df0,_0x44b47f){return function(_0x283d5b){try{logger[_0xdd9b('0x8')](_0xdd9b('0x9'),_0x5cf818,_0x524a29[0x0]);var _0x2a3c8c={'closed':0x1,'closedAt':moment()['format'](_0xdd9b('0xa')),'closeReason':_0xdd9b('0xb'),'disposition':_0x524a29[0x0]};if(rpc[_0x44b47f[_0xdd9b('0xc')]+_0xdd9b('0xd')]){rpc[_0x44b47f[_0xdd9b('0xc')]+_0xdd9b('0xd')][_0xdd9b('0xe')](_0x44b47f[_0xdd9b('0xf')]['id'],_0x2a3c8c)[_0xdd9b('0x10')](function(_0x237f5f){logger['info'](_0xdd9b('0x11'),_0x5cf818,_0x44b47f[_0xdd9b('0xf')]['id']);})[_0xdd9b('0x12')](function(_0x67e8e){logger[_0xdd9b('0x13')]('[%s][CLOSE]\x20%s',_0x5cf818,JSON[_0xdd9b('0x14')](_0x67e8e));})['finally'](function(){_0x283d5b['stop']();});}}catch(_0x79e901){logger['error'](_0xdd9b('0x15'),_0x5cf818,JSON[_0xdd9b('0x14')](_0x79e901));_0x283d5b[_0xdd9b('0x16')]();}};};
\ No newline at end of file
+var _0x139a=['[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!','catch','error','[%s][CLOSE]\x20%s','stringify','stop','moment','../../../../config/logger','routing','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction','../../rpc/whatsappInteraction','consequence','[%s][CLOSE]\x20reason\x20%s','format','YYYY-MM-DD\x20HH:mm:ss','channel','Interaction','update','interaction','then','info'];(function(_0x2c386b,_0x19c2d7){var _0x20257c=function(_0x2a455d){while(--_0x2a455d){_0x2c386b['push'](_0x2c386b['shift']());}};_0x20257c(++_0x19c2d7);}(_0x139a,0xb5));var _0xa139=function(_0x134b4f,_0x145384){_0x134b4f=_0x134b4f-0x0;var _0x208f94=_0x139a[_0x134b4f];return _0x208f94;};'use strict';var moment=require(_0xa139('0x0'));var logger=require(_0xa139('0x1'))(_0xa139('0x2'));var rpc={'chatInteraction':require(_0xa139('0x3')),'openchannelInteraction':require(_0xa139('0x4')),'smsInteraction':require(_0xa139('0x5')),'mailInteraction':require(_0xa139('0x6')),'faxInteraction':require(_0xa139('0x7')),'whatsappInteraction':require(_0xa139('0x8'))};exports[_0xa139('0x9')]=function(_0x247b51,_0x47db0b,_0x1425aa,_0x31b6d9){return function(_0x25d36c){try{logger['info'](_0xa139('0xa'),_0x247b51,_0x47db0b[0x0]);var _0x149696={'closed':0x1,'closedAt':moment()[_0xa139('0xb')](_0xa139('0xc')),'closeReason':'system','disposition':_0x47db0b[0x0]};if(rpc[_0x31b6d9[_0xa139('0xd')]+'Interaction']){rpc[_0x31b6d9[_0xa139('0xd')]+_0xa139('0xe')][_0xa139('0xf')](_0x31b6d9[_0xa139('0x10')]['id'],_0x149696)[_0xa139('0x11')](function(_0x325541){logger[_0xa139('0x12')](_0xa139('0x13'),_0x247b51,_0x31b6d9['interaction']['id']);})[_0xa139('0x14')](function(_0x574966){logger[_0xa139('0x15')](_0xa139('0x16'),_0x247b51,JSON[_0xa139('0x17')](_0x574966));})['finally'](function(){_0x25d36c['stop']();});}}catch(_0x12f6aa){logger['error'](_0xa139('0x16'),_0x247b51,JSON[_0xa139('0x17')](_0x12f6aa));_0x25d36c[_0xa139('0x18')]();}};};
\ No newline at end of file