Built motion from commit da617fac.|2.6.6
[motion2.git] / server / api / voiceContext / voiceContext.rpc.js
index 81ee44e..929b6c5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa887=['rpc','../../config/environment','jayson/promise','client','http','then','info','debug','VoiceContext,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','VoiceContext,\x20%s,\x20%s','result','catch','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x38a56d,_0x447f6d){var _0x2594eb=function(_0x358bcb){while(--_0x358bcb){_0x38a56d['push'](_0x38a56d['shift']());}};_0x2594eb(++_0x447f6d);}(_0xa887,0x89));var _0x7a88=function(_0x102e37,_0x14a181){_0x102e37=_0x102e37-0x0;var _0x35a07c=_0xa887[_0x102e37];return _0x35a07c;};'use strict';var _=require(_0x7a88('0x0'));var util=require('util');var moment=require(_0x7a88('0x1'));var BPromise=require(_0x7a88('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7a88('0x3'));var db=require(_0x7a88('0x4'))['db'];var utils=require(_0x7a88('0x5'));var logger=require(_0x7a88('0x6'))(_0x7a88('0x7'));var config=require(_0x7a88('0x8'));var jayson=require(_0x7a88('0x9'));var client=jayson[_0x7a88('0xa')][_0x7a88('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x52edce,_0x3a49be,_0x2d0445){return new BPromise(function(_0x5d7a48,_0x34f335){return client['request'](_0x52edce,_0x2d0445)[_0x7a88('0xc')](function(_0x179388){logger[_0x7a88('0xd')]('VoiceContext,\x20%s,\x20%s',_0x3a49be,'request\x20sent');logger[_0x7a88('0xe')](_0x7a88('0xf'),_0x3a49be,_0x7a88('0x10'),JSON[_0x7a88('0x11')](_0x179388));if(_0x179388[_0x7a88('0x12')]){if(_0x179388[_0x7a88('0x12')][_0x7a88('0x13')]===0x1f4){logger[_0x7a88('0x12')]('VoiceContext,\x20%s,\x20%s',_0x3a49be,_0x179388[_0x7a88('0x12')]['message']);return _0x34f335(_0x179388[_0x7a88('0x12')][_0x7a88('0x14')]);}logger[_0x7a88('0x12')](_0x7a88('0x15'),_0x3a49be,_0x179388['error'][_0x7a88('0x14')]);return _0x5d7a48(_0x179388['error'][_0x7a88('0x14')]);}else{logger['info']('VoiceContext,\x20%s,\x20%s',_0x3a49be,'request\x20sent');_0x5d7a48(_0x179388[_0x7a88('0x16')]['message']);}})[_0x7a88('0x17')](function(_0x71c7b9){logger[_0x7a88('0x12')](_0x7a88('0x15'),_0x3a49be,_0x71c7b9);_0x34f335(_0x71c7b9);});});}
\ No newline at end of file
+var _0x1f3c=['VoiceContext,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','moment','bluebird','randomstring','jayson/promise','http','request','then','info','VoiceContext,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x27d7e3,_0x3048d7){var _0x55c1a=function(_0x3ab7b7){while(--_0x3ab7b7){_0x27d7e3['push'](_0x27d7e3['shift']());}};_0x55c1a(++_0x3048d7);}(_0x1f3c,0xd7));var _0xc1f3=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0x1f3c[_0xa464c9];return _0x3d73c4;};'use strict';var _=require(_0xc1f3('0x0'));var util=require(_0xc1f3('0x1'));var moment=require(_0xc1f3('0x2'));var BPromise=require(_0xc1f3('0x3'));var rs=require(_0xc1f3('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require(_0xc1f3('0x5'));var client=jayson['client'][_0xc1f3('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x245eff,_0x47949a,_0x1ecd80){return new BPromise(function(_0x3d0978,_0x48c5a7){return client[_0xc1f3('0x7')](_0x245eff,_0x1ecd80)[_0xc1f3('0x8')](function(_0x3ad994){logger[_0xc1f3('0x9')](_0xc1f3('0xa'),_0x47949a,_0xc1f3('0xb'));logger[_0xc1f3('0xc')](_0xc1f3('0xd'),_0x47949a,_0xc1f3('0xb'),JSON[_0xc1f3('0xe')](_0x3ad994));if(_0x3ad994[_0xc1f3('0xf')]){if(_0x3ad994[_0xc1f3('0xf')]['code']===0x1f4){logger[_0xc1f3('0xf')]('VoiceContext,\x20%s,\x20%s',_0x47949a,_0x3ad994[_0xc1f3('0xf')]['message']);return _0x48c5a7(_0x3ad994[_0xc1f3('0xf')][_0xc1f3('0x10')]);}logger[_0xc1f3('0xf')](_0xc1f3('0xa'),_0x47949a,_0x3ad994[_0xc1f3('0xf')][_0xc1f3('0x10')]);return _0x3d0978(_0x3ad994[_0xc1f3('0xf')][_0xc1f3('0x10')]);}else{logger[_0xc1f3('0x9')](_0xc1f3('0xa'),_0x47949a,_0xc1f3('0xb'));_0x3d0978(_0x3ad994[_0xc1f3('0x11')][_0xc1f3('0x10')]);}})[_0xc1f3('0x12')](function(_0x1d0bbf){logger[_0xc1f3('0xf')](_0xc1f3('0xa'),_0x47949a,_0x1d0bbf);_0x48c5a7(_0x1d0bbf);});});}
\ No newline at end of file