Built motion from commit fade34fd.|2.5.41
[motion2.git] / server / services / routing / server / applications / close.js
index ea6cb66..07ad371 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5cba=['system','channel','Interaction','update','interaction','then','[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!','catch','error','[%s][CLOSE]\x20%s','finally','stop','moment','routing','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction','../../rpc/whatsappInteraction','consequence','info','[%s][CLOSE]\x20reason\x20%s','format','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x57cdc0,_0x564900){var _0x23418a=function(_0x267520){while(--_0x267520){_0x57cdc0['push'](_0x57cdc0['shift']());}};_0x23418a(++_0x564900);}(_0x5cba,0x1d4));var _0xa5cb=function(_0x42cae2,_0x284ef8){_0x42cae2=_0x42cae2-0x0;var _0x5f256f=_0x5cba[_0x42cae2];return _0x5f256f;};'use strict';var moment=require(_0xa5cb('0x0'));var logger=require('../../../../config/logger')(_0xa5cb('0x1'));var rpc={'chatInteraction':require(_0xa5cb('0x2')),'openchannelInteraction':require(_0xa5cb('0x3')),'smsInteraction':require('../../rpc/smsInteraction'),'mailInteraction':require(_0xa5cb('0x4')),'faxInteraction':require(_0xa5cb('0x5')),'whatsappInteraction':require(_0xa5cb('0x6'))};exports[_0xa5cb('0x7')]=function(_0x42eba4,_0x4eeb58,_0x342cbf,_0x1ceb24){return function(_0x3f4177){try{logger[_0xa5cb('0x8')](_0xa5cb('0x9'),_0x42eba4,_0x4eeb58[0x0]);var _0x3464f1={'closed':0x1,'closedAt':moment()[_0xa5cb('0xa')](_0xa5cb('0xb')),'closeReason':_0xa5cb('0xc'),'disposition':_0x4eeb58[0x0]};if(rpc[_0x1ceb24[_0xa5cb('0xd')]+'Interaction']){rpc[_0x1ceb24['channel']+_0xa5cb('0xe')][_0xa5cb('0xf')](_0x1ceb24[_0xa5cb('0x10')]['id'],_0x3464f1)[_0xa5cb('0x11')](function(_0x187228){logger[_0xa5cb('0x8')](_0xa5cb('0x12'),_0x42eba4,_0x1ceb24[_0xa5cb('0x10')]['id']);})[_0xa5cb('0x13')](function(_0x2e9afd){logger[_0xa5cb('0x14')](_0xa5cb('0x15'),_0x42eba4,JSON['stringify'](_0x2e9afd));})[_0xa5cb('0x16')](function(){_0x3f4177[_0xa5cb('0x17')]();});}}catch(_0x2cdffd){logger[_0xa5cb('0x14')](_0xa5cb('0x15'),_0x42eba4,JSON['stringify'](_0x2cdffd));_0x3f4177[_0xa5cb('0x17')]();}};};
\ No newline at end of file
+var _0xd8bb=['../../rpc/whatsappInteraction','consequence','YYYY-MM-DD\x20HH:mm:ss','system','Interaction','update','interaction','then','info','[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!','catch','error','[%s][CLOSE]\x20%s','stringify','stop','moment','../../../../config/logger','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction'];(function(_0x1765dc,_0x17d194){var _0x5e7800=function(_0x6d8197){while(--_0x6d8197){_0x1765dc['push'](_0x1765dc['shift']());}};_0x5e7800(++_0x17d194);}(_0xd8bb,0x1f3));var _0xbd8b=function(_0x514b6d,_0x5b2f7d){_0x514b6d=_0x514b6d-0x0;var _0x54723e=_0xd8bb[_0x514b6d];return _0x54723e;};'use strict';var moment=require(_0xbd8b('0x0'));var logger=require(_0xbd8b('0x1'))('routing');var rpc={'chatInteraction':require(_0xbd8b('0x2')),'openchannelInteraction':require(_0xbd8b('0x3')),'smsInteraction':require(_0xbd8b('0x4')),'mailInteraction':require(_0xbd8b('0x5')),'faxInteraction':require(_0xbd8b('0x6')),'whatsappInteraction':require(_0xbd8b('0x7'))};exports[_0xbd8b('0x8')]=function(_0x38f156,_0x145cd3,_0x4faba2,_0x1a4482){return function(_0x24a8ef){try{logger['info']('[%s][CLOSE]\x20reason\x20%s',_0x38f156,_0x145cd3[0x0]);var _0x3b1210={'closed':0x1,'closedAt':moment()['format'](_0xbd8b('0x9')),'closeReason':_0xbd8b('0xa'),'disposition':_0x145cd3[0x0]};if(rpc[_0x1a4482['channel']+_0xbd8b('0xb')]){rpc[_0x1a4482['channel']+_0xbd8b('0xb')][_0xbd8b('0xc')](_0x1a4482[_0xbd8b('0xd')]['id'],_0x3b1210)[_0xbd8b('0xe')](function(_0x56ada8){logger[_0xbd8b('0xf')](_0xbd8b('0x10'),_0x38f156,_0x1a4482[_0xbd8b('0xd')]['id']);})[_0xbd8b('0x11')](function(_0x3f3224){logger[_0xbd8b('0x12')](_0xbd8b('0x13'),_0x38f156,JSON[_0xbd8b('0x14')](_0x3f3224));})['finally'](function(){_0x24a8ef[_0xbd8b('0x15')]();});}}catch(_0x4b4c85){logger[_0xbd8b('0x12')]('[%s][CLOSE]\x20%s',_0x38f156,JSON[_0xbd8b('0x14')](_0x4b4c85));_0x24a8ef['stop']();}};};
\ No newline at end of file