Built motion from commit (unavailable).|2.3.9
[motion2.git] / server / services / routing / server / applications / close.js
index 6d21f29..0e5c076 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdac7=['finally','stop','error','stringify','moment','../../../../config/logger','../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction','consequence','[%s][CLOSE]\x20reason\x20%s','format','system','channel','Interaction','update','interaction','then','info','[%s][CLOSE]\x20%s'];(function(_0x5c9307,_0x5b97e4){var _0x373e29=function(_0xefebbd){while(--_0xefebbd){_0x5c9307['push'](_0x5c9307['shift']());}};_0x373e29(++_0x5b97e4);}(_0xdac7,0x180));var _0x7dac=function(_0x5cd478,_0x4d7dec){_0x5cd478=_0x5cd478-0x0;var _0xbf2e8c=_0xdac7[_0x5cd478];return _0xbf2e8c;};'use strict';var moment=require(_0x7dac('0x0'));var logger=require(_0x7dac('0x1'))('routing');var rpc={'chatInteraction':require('../../rpc/chatInteraction'),'openchannelInteraction':require('../../rpc/openchannelInteraction'),'smsInteraction':require(_0x7dac('0x2')),'mailInteraction':require(_0x7dac('0x3')),'faxInteraction':require(_0x7dac('0x4'))};exports[_0x7dac('0x5')]=function(_0x56d2ac,_0x4f55eb,_0x4987d1,_0x17a05f){return function(_0x2557ee){try{logger['info'](_0x7dac('0x6'),_0x56d2ac,_0x4f55eb[0x0]);var _0x53c460={'closed':0x1,'closedAt':moment()[_0x7dac('0x7')]('YYYY-MM-DD\x20HH:mm:ss'),'closeReason':_0x7dac('0x8'),'disposition':_0x4f55eb[0x0]};if(rpc[_0x17a05f[_0x7dac('0x9')]+_0x7dac('0xa')]){rpc[_0x17a05f[_0x7dac('0x9')]+_0x7dac('0xa')][_0x7dac('0xb')](_0x17a05f[_0x7dac('0xc')]['id'],_0x53c460)[_0x7dac('0xd')](function(_0x201464){logger[_0x7dac('0xe')]('[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!',_0x56d2ac,_0x17a05f['interaction']['id']);})['catch'](function(_0x28f4bc){logger['error'](_0x7dac('0xf'),_0x56d2ac,JSON['stringify'](_0x28f4bc));})[_0x7dac('0x10')](function(){_0x2557ee[_0x7dac('0x11')]();});}}catch(_0x4df20b){logger[_0x7dac('0x12')](_0x7dac('0xf'),_0x56d2ac,JSON[_0x7dac('0x13')](_0x4df20b));_0x2557ee[_0x7dac('0x11')]();}};};
\ No newline at end of file
+var _0x1491=['consequence','info','[%s][CLOSE]\x20reason\x20%s','format','YYYY-MM-DD\x20HH:mm:ss','system','channel','Interaction','interaction','[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!','[%s][CLOSE]\x20%s','stringify','finally','stop','error','moment','../../../../config/logger','routing','../../rpc/chatInteraction','../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction'];(function(_0x4eadae,_0x339e46){var _0x56116e=function(_0x596c88){while(--_0x596c88){_0x4eadae['push'](_0x4eadae['shift']());}};_0x56116e(++_0x339e46);}(_0x1491,0x1b1));var _0x1149=function(_0x5f4ce2,_0x42c469){_0x5f4ce2=_0x5f4ce2-0x0;var _0x219b5b=_0x1491[_0x5f4ce2];return _0x219b5b;};'use strict';var moment=require(_0x1149('0x0'));var logger=require(_0x1149('0x1'))(_0x1149('0x2'));var rpc={'chatInteraction':require(_0x1149('0x3')),'openchannelInteraction':require('../../rpc/openchannelInteraction'),'smsInteraction':require(_0x1149('0x4')),'mailInteraction':require(_0x1149('0x5')),'faxInteraction':require(_0x1149('0x6'))};exports[_0x1149('0x7')]=function(_0x443acb,_0x206e15,_0x2bf83d,_0x14b438){return function(_0x1ebf2b){try{logger[_0x1149('0x8')](_0x1149('0x9'),_0x443acb,_0x206e15[0x0]);var _0x3bf02f={'closed':0x1,'closedAt':moment()[_0x1149('0xa')](_0x1149('0xb')),'closeReason':_0x1149('0xc'),'disposition':_0x206e15[0x0]};if(rpc[_0x14b438[_0x1149('0xd')]+_0x1149('0xe')]){rpc[_0x14b438[_0x1149('0xd')]+_0x1149('0xe')]['update'](_0x14b438[_0x1149('0xf')]['id'],_0x3bf02f)['then'](function(_0x5150f9){logger['info'](_0x1149('0x10'),_0x443acb,_0x14b438['interaction']['id']);})['catch'](function(_0xd84570){logger['error'](_0x1149('0x11'),_0x443acb,JSON[_0x1149('0x12')](_0xd84570));})[_0x1149('0x13')](function(){_0x1ebf2b[_0x1149('0x14')]();});}}catch(_0x3ed5e8){logger[_0x1149('0x15')]('[%s][CLOSE]\x20%s',_0x443acb,JSON[_0x1149('0x12')](_0x3ed5e8));_0x1ebf2b['stop']();}};};
\ No newline at end of file