Built motion from commit c0cdc9d8.|2.6.28
[motion2.git] / server / services / routing / server / applications / close.js
index 994a89e..fa2f5c6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc08b=['format','YYYY-MM-DD\x20HH:mm:ss','channel','update','interaction','then','[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!','catch','error','[%s][CLOSE]\x20%s','stringify','finally','stop','../../../../config/logger','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/whatsappInteraction','consequence','info','[%s][CLOSE]\x20reason\x20%s'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xc08b,0x1f1));var _0xbc08=function(_0x1e036f,_0x3d1321){_0x1e036f=_0x1e036f-0x0;var _0x5ecf67=_0xc08b[_0x1e036f];return _0x5ecf67;};'use strict';var moment=require('moment');var logger=require(_0xbc08('0x0'))('routing');var rpc={'chatInteraction':require(_0xbc08('0x1')),'openchannelInteraction':require(_0xbc08('0x2')),'smsInteraction':require(_0xbc08('0x3')),'mailInteraction':require(_0xbc08('0x4')),'faxInteraction':require('../../rpc/faxInteraction'),'whatsappInteraction':require(_0xbc08('0x5'))};exports[_0xbc08('0x6')]=function(_0x3bf8f3,_0x3889e7,_0x935c21,_0x3dbe32){return function(_0x3c07e5){try{logger[_0xbc08('0x7')](_0xbc08('0x8'),_0x3bf8f3,_0x3889e7[0x0]);var _0x13ae16={'closed':0x1,'closedAt':moment()[_0xbc08('0x9')](_0xbc08('0xa')),'closeReason':'system','disposition':_0x3889e7[0x0]};if(rpc[_0x3dbe32[_0xbc08('0xb')]+'Interaction']){rpc[_0x3dbe32[_0xbc08('0xb')]+'Interaction'][_0xbc08('0xc')](_0x3dbe32[_0xbc08('0xd')]['id'],_0x13ae16)[_0xbc08('0xe')](function(_0x58b0c4){logger['info'](_0xbc08('0xf'),_0x3bf8f3,_0x3dbe32['interaction']['id']);})[_0xbc08('0x10')](function(_0x3e9df5){logger[_0xbc08('0x11')](_0xbc08('0x12'),_0x3bf8f3,JSON[_0xbc08('0x13')](_0x3e9df5));})[_0xbc08('0x14')](function(){_0x3c07e5[_0xbc08('0x15')]();});}}catch(_0x4510d5){logger[_0xbc08('0x11')](_0xbc08('0x12'),_0x3bf8f3,JSON['stringify'](_0x4510d5));_0x3c07e5[_0xbc08('0x15')]();}};};
\ No newline at end of file
+var _0xd3f5=['system','channel','Interaction','then','[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!','interaction','error','stringify','finally','stop','[%s][CLOSE]\x20%s','moment','../../../../config/logger','routing','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/whatsappInteraction','consequence','info','format','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x2dd7ba,_0x2f1a58){var _0x3a659f=function(_0x1e5497){while(--_0x1e5497){_0x2dd7ba['push'](_0x2dd7ba['shift']());}};_0x3a659f(++_0x2f1a58);}(_0xd3f5,0x1a9));var _0x5d3f=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0xd3f5[_0x3b380d];return _0x54502b;};'use strict';var moment=require(_0x5d3f('0x0'));var logger=require(_0x5d3f('0x1'))(_0x5d3f('0x2'));var rpc={'chatInteraction':require(_0x5d3f('0x3')),'openchannelInteraction':require(_0x5d3f('0x4')),'smsInteraction':require(_0x5d3f('0x5')),'mailInteraction':require(_0x5d3f('0x6')),'faxInteraction':require('../../rpc/faxInteraction'),'whatsappInteraction':require(_0x5d3f('0x7'))};exports[_0x5d3f('0x8')]=function(_0x5c7111,_0x16c65d,_0x3436f1,_0x247ad0){return function(_0xfb068f){try{logger[_0x5d3f('0x9')]('[%s][CLOSE]\x20reason\x20%s',_0x5c7111,_0x16c65d[0x0]);var _0x41d9c5={'closed':0x1,'closedAt':moment()[_0x5d3f('0xa')](_0x5d3f('0xb')),'closeReason':_0x5d3f('0xc'),'disposition':_0x16c65d[0x0]};if(rpc[_0x247ad0[_0x5d3f('0xd')]+_0x5d3f('0xe')]){rpc[_0x247ad0[_0x5d3f('0xd')]+_0x5d3f('0xe')]['update'](_0x247ad0['interaction']['id'],_0x41d9c5)[_0x5d3f('0xf')](function(_0x5615b2){logger[_0x5d3f('0x9')](_0x5d3f('0x10'),_0x5c7111,_0x247ad0[_0x5d3f('0x11')]['id']);})['catch'](function(_0x4595b6){logger[_0x5d3f('0x12')]('[%s][CLOSE]\x20%s',_0x5c7111,JSON[_0x5d3f('0x13')](_0x4595b6));})[_0x5d3f('0x14')](function(){_0xfb068f[_0x5d3f('0x15')]();});}}catch(_0x54bf5b){logger[_0x5d3f('0x12')](_0x5d3f('0x16'),_0x5c7111,JSON['stringify'](_0x54bf5b));_0xfb068f[_0x5d3f('0x15')]();}};};
\ No newline at end of file