Built motion from commit 973e3e332e1c8e2f84c4b0cd2e5af794131724f5. Version 3.0.0...
[motion-next.git] / server / services / routing / server / applications / close.js
index 9a6ceec..691111a 100644 (file)
@@ -1 +1 @@
-const a1202_0x3a77=['system','stringify','then','YYYY-MM-DD\x20HH:mm:ss','[%s][CLOSE]\x20reason\x20%s','../../rpc/openchannelInteraction','stop','../../rpc/mailInteraction','../../rpc/faxInteraction','routing','channel','error','format','catch','../../rpc/smsInteraction','../../rpc/whatsappInteraction','interaction','finally','consequence','Interaction','[%s][CLOSE]\x20%s','../../rpc/chatInteraction'];(function(_0x53a7d4,_0x3a77c9){const _0x177bbe=function(_0x44ad7c){while(--_0x44ad7c){_0x53a7d4['push'](_0x53a7d4['shift']());}};_0x177bbe(++_0x3a77c9);}(a1202_0x3a77,0xbd));const a1202_0x177b=function(_0x53a7d4,_0x3a77c9){_0x53a7d4=_0x53a7d4-0x0;let _0x177bbe=a1202_0x3a77[_0x53a7d4];return _0x177bbe;};const _0x21d726=a1202_0x177b;'use strict';const moment=require('moment'),logger=require('../../../../config/logger')(_0x21d726('0x12')),rpc={'chatInteraction':require(_0x21d726('0x8')),'openchannelInteraction':require(_0x21d726('0xe')),'smsInteraction':require(_0x21d726('0x1')),'mailInteraction':require(_0x21d726('0x10')),'faxInteraction':require(_0x21d726('0x11')),'whatsappInteraction':require(_0x21d726('0x2'))};exports[_0x21d726('0x5')]=function(_0x44ad7c,_0x5ab404,_0x5ea058,_0x2835ed){return function(_0x336767){const _0x4a3b72=a1202_0x177b;try{logger['info'](_0x4a3b72('0xd'),_0x44ad7c,_0x5ab404[0x0]);const _0x4dc6af={'closed':0x1,'closedAt':moment()[_0x4a3b72('0x15')](_0x4a3b72('0xc')),'closeReason':_0x4a3b72('0x9'),'disposition':_0x5ab404[0x0]};rpc[_0x2835ed[_0x4a3b72('0x13')]+_0x4a3b72('0x6')]&&rpc[_0x2835ed[_0x4a3b72('0x13')]+_0x4a3b72('0x6')]['update'](_0x2835ed[_0x4a3b72('0x3')]['id'],_0x4dc6af)[_0x4a3b72('0xb')](function(){const _0x7814ba=_0x4a3b72;logger['info']('[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!',_0x44ad7c,_0x2835ed[_0x7814ba('0x3')]['id']);})[_0x4a3b72('0x0')](function(_0x7f6f1d){const _0x10a098=_0x4a3b72;logger[_0x10a098('0x14')](_0x10a098('0x7'),_0x44ad7c,JSON[_0x10a098('0xa')](_0x7f6f1d));})[_0x4a3b72('0x4')](function(){const _0x327b1d=_0x4a3b72;_0x336767[_0x327b1d('0xf')]();});}catch(_0x3765e6){logger[_0x4a3b72('0x14')]('[%s][CLOSE]\x20%s',_0x44ad7c,JSON[_0x4a3b72('0xa')](_0x3765e6)),_0x336767[_0x4a3b72('0xf')]();}};};
\ No newline at end of file
+const a1203_0x4b57=['stop','consequence','../../rpc/openchannelInteraction','../../rpc/whatsappInteraction','system','update','../../../../config/logger','moment','../../rpc/smsInteraction','[%s][CLOSE]\x20%s','format','channel','interaction','../../rpc/mailInteraction','info','[%s][CLOSE]\x20reason\x20%s','stringify','error','../../rpc/chatInteraction','../../rpc/faxInteraction','catch','Interaction','routing'];(function(_0x428620,_0x4b57d7){const _0x413b74=function(_0x25a5c5){while(--_0x25a5c5){_0x428620['push'](_0x428620['shift']());}};_0x413b74(++_0x4b57d7);}(a1203_0x4b57,0x1c4));const a1203_0x413b=function(_0x428620,_0x4b57d7){_0x428620=_0x428620-0x0;let _0x413b74=a1203_0x4b57[_0x428620];return _0x413b74;};const _0x2dc0d0=a1203_0x413b;'use strict';const moment=require(_0x2dc0d0('0xf')),logger=require(_0x2dc0d0('0xe'))(_0x2dc0d0('0x7')),rpc={'chatInteraction':require(_0x2dc0d0('0x3')),'openchannelInteraction':require(_0x2dc0d0('0xa')),'smsInteraction':require(_0x2dc0d0('0x10')),'mailInteraction':require(_0x2dc0d0('0x15')),'faxInteraction':require(_0x2dc0d0('0x4')),'whatsappInteraction':require(_0x2dc0d0('0xb'))};exports[_0x2dc0d0('0x9')]=function(_0x25a5c5,_0x1549e8,_0x49bbae,_0x37cdc4){return function(_0x253950){const _0x33f7c6=a1203_0x413b;try{logger['info'](_0x33f7c6('0x0'),_0x25a5c5,_0x1549e8[0x0]);const _0x357b98={'closed':0x1,'closedAt':moment()[_0x33f7c6('0x12')]('YYYY-MM-DD\x20HH:mm:ss'),'closeReason':_0x33f7c6('0xc'),'disposition':_0x1549e8[0x0]};rpc[_0x37cdc4[_0x33f7c6('0x13')]+'Interaction']&&rpc[_0x37cdc4['channel']+_0x33f7c6('0x6')][_0x33f7c6('0xd')](_0x37cdc4['interaction']['id'],_0x357b98)['then'](function(){const _0x30cd8b=_0x33f7c6;logger[_0x30cd8b('0x16')]('[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!',_0x25a5c5,_0x37cdc4[_0x30cd8b('0x14')]['id']);})[_0x33f7c6('0x5')](function(_0x2787d2){const _0x462051=_0x33f7c6;logger[_0x462051('0x2')](_0x462051('0x11'),_0x25a5c5,JSON[_0x462051('0x1')](_0x2787d2));})['finally'](function(){const _0x2ec132=_0x33f7c6;_0x253950[_0x2ec132('0x8')]();});}catch(_0x570c9f){logger['error'](_0x33f7c6('0x11'),_0x25a5c5,JSON[_0x33f7c6('0x1')](_0x570c9f)),_0x253950[_0x33f7c6('0x8')]();}};};
\ No newline at end of file