Built motion from commit f67b3b02.|2.6.31
[motion2.git] / server / services / routing / server / applications / close.js
index fecdd22..a7b9fad 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x431b=['YYYY-MM-DD\x20HH:mm:ss','system','channel','Interaction','update','then','info','[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!','error','[%s][CLOSE]\x20%s','stringify','stop','moment','../../../../config/logger','routing','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction','../../rpc/whatsappInteraction','consequence','[%s][CLOSE]\x20reason\x20%s','format'];(function(_0x2e4b5e,_0x328348){var _0x2bab89=function(_0x201c62){while(--_0x201c62){_0x2e4b5e['push'](_0x2e4b5e['shift']());}};_0x2bab89(++_0x328348);}(_0x431b,0x137));var _0xb431=function(_0x12aa98,_0x39916d){_0x12aa98=_0x12aa98-0x0;var _0x42935f=_0x431b[_0x12aa98];return _0x42935f;};'use strict';var moment=require(_0xb431('0x0'));var logger=require(_0xb431('0x1'))(_0xb431('0x2'));var rpc={'chatInteraction':require(_0xb431('0x3')),'openchannelInteraction':require(_0xb431('0x4')),'smsInteraction':require('../../rpc/smsInteraction'),'mailInteraction':require(_0xb431('0x5')),'faxInteraction':require(_0xb431('0x6')),'whatsappInteraction':require(_0xb431('0x7'))};exports[_0xb431('0x8')]=function(_0x2a3e5c,_0xb1d2ae,_0x3fa8b3,_0x31d53c){return function(_0x548db2){try{logger['info'](_0xb431('0x9'),_0x2a3e5c,_0xb1d2ae[0x0]);var _0x18d1cb={'closed':0x1,'closedAt':moment()[_0xb431('0xa')](_0xb431('0xb')),'closeReason':_0xb431('0xc'),'disposition':_0xb1d2ae[0x0]};if(rpc[_0x31d53c[_0xb431('0xd')]+_0xb431('0xe')]){rpc[_0x31d53c[_0xb431('0xd')]+_0xb431('0xe')][_0xb431('0xf')](_0x31d53c['interaction']['id'],_0x18d1cb)[_0xb431('0x10')](function(_0x4ad635){logger[_0xb431('0x11')](_0xb431('0x12'),_0x2a3e5c,_0x31d53c['interaction']['id']);})['catch'](function(_0x2835eb){logger[_0xb431('0x13')](_0xb431('0x14'),_0x2a3e5c,JSON[_0xb431('0x15')](_0x2835eb));})['finally'](function(){_0x548db2[_0xb431('0x16')]();});}}catch(_0x3781a5){logger[_0xb431('0x13')]('[%s][CLOSE]\x20%s',_0x2a3e5c,JSON[_0xb431('0x15')](_0x3781a5));_0x548db2[_0xb431('0x16')]();}};};
\ No newline at end of file
+var _0x6eb3=['then','catch','error','[%s][CLOSE]\x20%s','stringify','finally','stop','moment','../../../../config/logger','routing','../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction','consequence','info','[%s][CLOSE]\x20reason\x20%s','format','system','Interaction','update','interaction'];(function(_0xcda377,_0x1e2678){var _0x1c024f=function(_0x1aeb61){while(--_0x1aeb61){_0xcda377['push'](_0xcda377['shift']());}};_0x1c024f(++_0x1e2678);}(_0x6eb3,0xee));var _0x36eb=function(_0x2bc64b,_0x305572){_0x2bc64b=_0x2bc64b-0x0;var _0x54afa5=_0x6eb3[_0x2bc64b];return _0x54afa5;};'use strict';var moment=require(_0x36eb('0x0'));var logger=require(_0x36eb('0x1'))(_0x36eb('0x2'));var rpc={'chatInteraction':require('../../rpc/chatInteraction'),'openchannelInteraction':require('../../rpc/openchannelInteraction'),'smsInteraction':require(_0x36eb('0x3')),'mailInteraction':require(_0x36eb('0x4')),'faxInteraction':require(_0x36eb('0x5')),'whatsappInteraction':require('../../rpc/whatsappInteraction')};exports[_0x36eb('0x6')]=function(_0x4a8465,_0x5323f8,_0x5d0217,_0x59c491){return function(_0x3942a3){try{logger[_0x36eb('0x7')](_0x36eb('0x8'),_0x4a8465,_0x5323f8[0x0]);var _0x332dad={'closed':0x1,'closedAt':moment()[_0x36eb('0x9')]('YYYY-MM-DD\x20HH:mm:ss'),'closeReason':_0x36eb('0xa'),'disposition':_0x5323f8[0x0]};if(rpc[_0x59c491['channel']+_0x36eb('0xb')]){rpc[_0x59c491['channel']+_0x36eb('0xb')][_0x36eb('0xc')](_0x59c491[_0x36eb('0xd')]['id'],_0x332dad)[_0x36eb('0xe')](function(_0x3027f5){logger[_0x36eb('0x7')]('[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!',_0x4a8465,_0x59c491[_0x36eb('0xd')]['id']);})[_0x36eb('0xf')](function(_0x1f973f){logger[_0x36eb('0x10')](_0x36eb('0x11'),_0x4a8465,JSON[_0x36eb('0x12')](_0x1f973f));})[_0x36eb('0x13')](function(){_0x3942a3[_0x36eb('0x14')]();});}}catch(_0x5a81da){logger['error']('[%s][CLOSE]\x20%s',_0x4a8465,JSON[_0x36eb('0x12')](_0x5a81da));_0x3942a3[_0x36eb('0x14')]();}};};
\ No newline at end of file