Built motion from commit 449495f6.|2.6.27
[motion2.git] / server / services / routing / server / applications / close.js
index af9b059..80642ab 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9ac6=['[%s][CLOSE]\x20%s','stringify','finally','stop','error','../../../../config/logger','routing','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction','consequence','info','[%s][CLOSE]\x20reason\x20%s','format','channel','Interaction','interaction','then','[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!','catch'];(function(_0x46c143,_0x1862bc){var _0x36d43b=function(_0x2c34f1){while(--_0x2c34f1){_0x46c143['push'](_0x46c143['shift']());}};_0x36d43b(++_0x1862bc);}(_0x9ac6,0x10d));var _0x69ac=function(_0x4edb84,_0x4c412f){_0x4edb84=_0x4edb84-0x0;var _0x57d78a=_0x9ac6[_0x4edb84];return _0x57d78a;};'use strict';var moment=require('moment');var logger=require(_0x69ac('0x0'))(_0x69ac('0x1'));var rpc={'chatInteraction':require(_0x69ac('0x2')),'openchannelInteraction':require(_0x69ac('0x3')),'smsInteraction':require(_0x69ac('0x4')),'mailInteraction':require(_0x69ac('0x5')),'faxInteraction':require(_0x69ac('0x6')),'whatsappInteraction':require('../../rpc/whatsappInteraction')};exports[_0x69ac('0x7')]=function(_0x2cb996,_0x566b56,_0x5defc5,_0x5e1a74){return function(_0x1bbef4){try{logger[_0x69ac('0x8')](_0x69ac('0x9'),_0x2cb996,_0x566b56[0x0]);var _0x14dbb5={'closed':0x1,'closedAt':moment()[_0x69ac('0xa')]('YYYY-MM-DD\x20HH:mm:ss'),'closeReason':'system','disposition':_0x566b56[0x0]};if(rpc[_0x5e1a74[_0x69ac('0xb')]+_0x69ac('0xc')]){rpc[_0x5e1a74['channel']+_0x69ac('0xc')]['update'](_0x5e1a74[_0x69ac('0xd')]['id'],_0x14dbb5)[_0x69ac('0xe')](function(_0x25b455){logger[_0x69ac('0x8')](_0x69ac('0xf'),_0x2cb996,_0x5e1a74[_0x69ac('0xd')]['id']);})[_0x69ac('0x10')](function(_0x72b782){logger['error'](_0x69ac('0x11'),_0x2cb996,JSON[_0x69ac('0x12')](_0x72b782));})[_0x69ac('0x13')](function(){_0x1bbef4[_0x69ac('0x14')]();});}}catch(_0x4f63f8){logger[_0x69ac('0x15')]('[%s][CLOSE]\x20%s',_0x2cb996,JSON[_0x69ac('0x12')](_0x4f63f8));_0x1bbef4[_0x69ac('0x14')]();}};};
\ No newline at end of file
+var _0xe6da=['../../../../config/logger','routing','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction','consequence','info','[%s][CLOSE]\x20reason\x20%s','format','YYYY-MM-DD\x20HH:mm:ss','system','channel','Interaction','update','[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!','catch','[%s][CLOSE]\x20%s','stringify','finally','stop','error'];(function(_0x47a0c0,_0x4d132e){var _0x1324f8=function(_0x5955f1){while(--_0x5955f1){_0x47a0c0['push'](_0x47a0c0['shift']());}};_0x1324f8(++_0x4d132e);}(_0xe6da,0x73));var _0xae6d=function(_0x430a84,_0x9b2ae){_0x430a84=_0x430a84-0x0;var _0x454377=_0xe6da[_0x430a84];return _0x454377;};'use strict';var moment=require('moment');var logger=require(_0xae6d('0x0'))(_0xae6d('0x1'));var rpc={'chatInteraction':require(_0xae6d('0x2')),'openchannelInteraction':require(_0xae6d('0x3')),'smsInteraction':require(_0xae6d('0x4')),'mailInteraction':require(_0xae6d('0x5')),'faxInteraction':require(_0xae6d('0x6')),'whatsappInteraction':require('../../rpc/whatsappInteraction')};exports[_0xae6d('0x7')]=function(_0x2fd081,_0x44463d,_0x4b15ff,_0x4ff014){return function(_0x9aa339){try{logger[_0xae6d('0x8')](_0xae6d('0x9'),_0x2fd081,_0x44463d[0x0]);var _0x405c77={'closed':0x1,'closedAt':moment()[_0xae6d('0xa')](_0xae6d('0xb')),'closeReason':_0xae6d('0xc'),'disposition':_0x44463d[0x0]};if(rpc[_0x4ff014[_0xae6d('0xd')]+_0xae6d('0xe')]){rpc[_0x4ff014[_0xae6d('0xd')]+_0xae6d('0xe')][_0xae6d('0xf')](_0x4ff014['interaction']['id'],_0x405c77)['then'](function(_0xc9168b){logger['info'](_0xae6d('0x10'),_0x2fd081,_0x4ff014['interaction']['id']);})[_0xae6d('0x11')](function(_0x5474ca){logger['error'](_0xae6d('0x12'),_0x2fd081,JSON[_0xae6d('0x13')](_0x5474ca));})[_0xae6d('0x14')](function(){_0x9aa339[_0xae6d('0x15')]();});}}catch(_0x5d71a9){logger[_0xae6d('0x16')](_0xae6d('0x12'),_0x2fd081,JSON[_0xae6d('0x13')](_0x5d71a9));_0x9aa339[_0xae6d('0x15')]();}};};
\ No newline at end of file