Built motion from commit (unavailable).|2.5.23
[motion2.git] / server / api / voiceContext / voiceContext.rpc.js
index 0bf09ab..87b9bfe 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xedb4=['request\x20sent','debug','VoiceContext,\x20%s,\x20%s,\x20%s','stringify','error','message','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','info','VoiceContext,\x20%s,\x20%s'];(function(_0x1f9f5a,_0xc8d124){var _0x4f35c0=function(_0x278f65){while(--_0x278f65){_0x1f9f5a['push'](_0x1f9f5a['shift']());}};_0x4f35c0(++_0xc8d124);}(_0xedb4,0x156));var _0x4edb=function(_0x1ebc6c,_0x58a00b){_0x1ebc6c=_0x1ebc6c-0x0;var _0x3a826d=_0xedb4[_0x1ebc6c];return _0x3a826d;};'use strict';var _=require('lodash');var util=require(_0x4edb('0x0'));var moment=require(_0x4edb('0x1'));var BPromise=require(_0x4edb('0x2'));var rs=require(_0x4edb('0x3'));var fs=require('fs');var Redis=require(_0x4edb('0x4'));var db=require(_0x4edb('0x5'))['db'];var utils=require(_0x4edb('0x6'));var logger=require(_0x4edb('0x7'))(_0x4edb('0x8'));var config=require(_0x4edb('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x4edb('0xa')][_0x4edb('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x48f537,_0x238e3b,_0x2e1ce4){return new BPromise(function(_0x5242fa,_0x41fc06){return client[_0x4edb('0xc')](_0x48f537,_0x2e1ce4)['then'](function(_0x103718){logger[_0x4edb('0xd')](_0x4edb('0xe'),_0x238e3b,_0x4edb('0xf'));logger[_0x4edb('0x10')](_0x4edb('0x11'),_0x238e3b,_0x4edb('0xf'),JSON[_0x4edb('0x12')](_0x103718));if(_0x103718[_0x4edb('0x13')]){if(_0x103718[_0x4edb('0x13')]['code']===0x1f4){logger[_0x4edb('0x13')](_0x4edb('0xe'),_0x238e3b,_0x103718[_0x4edb('0x13')]['message']);return _0x41fc06(_0x103718[_0x4edb('0x13')][_0x4edb('0x14')]);}logger['error'](_0x4edb('0xe'),_0x238e3b,_0x103718[_0x4edb('0x13')]['message']);return _0x5242fa(_0x103718[_0x4edb('0x13')][_0x4edb('0x14')]);}else{logger[_0x4edb('0xd')](_0x4edb('0xe'),_0x238e3b,_0x4edb('0xf'));_0x5242fa(_0x103718['result'][_0x4edb('0x14')]);}})['catch'](function(_0x32fe6d){logger['error'](_0x4edb('0xe'),_0x238e3b,_0x32fe6d);_0x41fc06(_0x32fe6d);});});}
\ No newline at end of file
+var _0xc639=['message','result','lodash','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','http','then','VoiceContext,\x20%s,\x20%s','request\x20sent','debug','VoiceContext,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x55e659,_0x233aa4){var _0xca08c7=function(_0xe1c5b0){while(--_0xe1c5b0){_0x55e659['push'](_0x55e659['shift']());}};_0xca08c7(++_0x233aa4);}(_0xc639,0xc0));var _0x9c63=function(_0xf58324,_0x5908fd){_0xf58324=_0xf58324-0x0;var _0x143ae3=_0xc639[_0xf58324];return _0x143ae3;};'use strict';var _=require(_0x9c63('0x0'));var util=require('util');var moment=require(_0x9c63('0x1'));var BPromise=require(_0x9c63('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9c63('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x9c63('0x4'));var logger=require(_0x9c63('0x5'))(_0x9c63('0x6'));var config=require(_0x9c63('0x7'));var jayson=require('jayson/promise');var client=jayson['client'][_0x9c63('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x308cf3,_0x1b9365,_0x490321){return new BPromise(function(_0x506234,_0x52c13d){return client['request'](_0x308cf3,_0x490321)[_0x9c63('0x9')](function(_0x376245){logger['info'](_0x9c63('0xa'),_0x1b9365,_0x9c63('0xb'));logger[_0x9c63('0xc')](_0x9c63('0xd'),_0x1b9365,_0x9c63('0xb'),JSON[_0x9c63('0xe')](_0x376245));if(_0x376245[_0x9c63('0xf')]){if(_0x376245[_0x9c63('0xf')][_0x9c63('0x10')]===0x1f4){logger[_0x9c63('0xf')](_0x9c63('0xa'),_0x1b9365,_0x376245[_0x9c63('0xf')][_0x9c63('0x11')]);return _0x52c13d(_0x376245['error']['message']);}logger[_0x9c63('0xf')](_0x9c63('0xa'),_0x1b9365,_0x376245[_0x9c63('0xf')][_0x9c63('0x11')]);return _0x506234(_0x376245['error'][_0x9c63('0x11')]);}else{logger['info'](_0x9c63('0xa'),_0x1b9365,'request\x20sent');_0x506234(_0x376245[_0x9c63('0x12')]['message']);}})['catch'](function(_0xc0f75c){logger[_0x9c63('0xf')](_0x9c63('0xa'),_0x1b9365,_0xc0f75c);_0x52c13d(_0xc0f75c);});});}
\ No newline at end of file