Built motion from commit (unavailable).|2.5.21
[motion2.git] / server / api / voiceChanSpy / voiceChanSpy.rpc.js
index 1965818..02d916b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa730=['../../config/utils','rpc','../../config/environment','jayson/promise','then','request\x20sent','VoiceChanSpy,\x20%s,\x20%s,\x20%s','stringify','error','VoiceChanSpy,\x20%s,\x20%s','message','info','result','catch','util','randomstring'];(function(_0x53faa8,_0x5f53bf){var _0x433942=function(_0x32126b){while(--_0x32126b){_0x53faa8['push'](_0x53faa8['shift']());}};_0x433942(++_0x5f53bf);}(_0xa730,0x14e));var _0x0a73=function(_0x5317e2,_0x3df6c5){_0x5317e2=_0x5317e2-0x0;var _0x2ac5d7=_0xa730[_0x5317e2];return _0x2ac5d7;};'use strict';var _=require('lodash');var util=require(_0x0a73('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x0a73('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x0a73('0x2'));var logger=require('../../config/logger')(_0x0a73('0x3'));var config=require(_0x0a73('0x4'));var jayson=require(_0x0a73('0x5'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x30e3e9,_0x5e23d3,_0x2c5143){return new BPromise(function(_0x6cb7cf,_0x21afc3){return client['request'](_0x30e3e9,_0x2c5143)[_0x0a73('0x6')](function(_0x23daac){logger['info']('VoiceChanSpy,\x20%s,\x20%s',_0x5e23d3,_0x0a73('0x7'));logger['debug'](_0x0a73('0x8'),_0x5e23d3,'request\x20sent',JSON[_0x0a73('0x9')](_0x23daac));if(_0x23daac[_0x0a73('0xa')]){if(_0x23daac[_0x0a73('0xa')]['code']===0x1f4){logger[_0x0a73('0xa')](_0x0a73('0xb'),_0x5e23d3,_0x23daac[_0x0a73('0xa')]['message']);return _0x21afc3(_0x23daac[_0x0a73('0xa')][_0x0a73('0xc')]);}logger[_0x0a73('0xa')](_0x0a73('0xb'),_0x5e23d3,_0x23daac['error']['message']);return _0x6cb7cf(_0x23daac['error']['message']);}else{logger[_0x0a73('0xd')](_0x0a73('0xb'),_0x5e23d3,_0x0a73('0x7'));_0x6cb7cf(_0x23daac[_0x0a73('0xe')][_0x0a73('0xc')]);}})[_0x0a73('0xf')](function(_0x3628aa){logger['error']('VoiceChanSpy,\x20%s,\x20%s',_0x5e23d3,_0x3628aa);_0x21afc3(_0x3628aa);});});}
\ No newline at end of file
+var _0x3aaf=['request\x20sent','stringify','error','message','info','result','catch','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','VoiceChanSpy,\x20%s,\x20%s','debug','VoiceChanSpy,\x20%s,\x20%s,\x20%s'];(function(_0x152ac9,_0x3d8915){var _0xe9bbb0=function(_0xbfba67){while(--_0xbfba67){_0x152ac9['push'](_0x152ac9['shift']());}};_0xe9bbb0(++_0x3d8915);}(_0x3aaf,0x177));var _0xf3aa=function(_0x4dbaad,_0x730318){_0x4dbaad=_0x4dbaad-0x0;var _0x226c72=_0x3aaf[_0x4dbaad];return _0x226c72;};'use strict';var _=require('lodash');var util=require(_0xf3aa('0x0'));var moment=require('moment');var BPromise=require(_0xf3aa('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xf3aa('0x2'));var db=require(_0xf3aa('0x3'))['db'];var utils=require(_0xf3aa('0x4'));var logger=require(_0xf3aa('0x5'))(_0xf3aa('0x6'));var config=require(_0xf3aa('0x7'));var jayson=require(_0xf3aa('0x8'));var client=jayson[_0xf3aa('0x9')][_0xf3aa('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2da461,_0x4bb42b,_0x3cb0a4){return new BPromise(function(_0x7eb862,_0x495bfe){return client[_0xf3aa('0xb')](_0x2da461,_0x3cb0a4)[_0xf3aa('0xc')](function(_0x19df51){logger['info'](_0xf3aa('0xd'),_0x4bb42b,'request\x20sent');logger[_0xf3aa('0xe')](_0xf3aa('0xf'),_0x4bb42b,_0xf3aa('0x10'),JSON[_0xf3aa('0x11')](_0x19df51));if(_0x19df51[_0xf3aa('0x12')]){if(_0x19df51[_0xf3aa('0x12')]['code']===0x1f4){logger[_0xf3aa('0x12')]('VoiceChanSpy,\x20%s,\x20%s',_0x4bb42b,_0x19df51['error'][_0xf3aa('0x13')]);return _0x495bfe(_0x19df51['error'][_0xf3aa('0x13')]);}logger[_0xf3aa('0x12')](_0xf3aa('0xd'),_0x4bb42b,_0x19df51[_0xf3aa('0x12')][_0xf3aa('0x13')]);return _0x7eb862(_0x19df51[_0xf3aa('0x12')]['message']);}else{logger[_0xf3aa('0x14')](_0xf3aa('0xd'),_0x4bb42b,_0xf3aa('0x10'));_0x7eb862(_0x19df51[_0xf3aa('0x15')][_0xf3aa('0x13')]);}})[_0xf3aa('0x16')](function(_0x45728b){logger['error'](_0xf3aa('0xd'),_0x4bb42b,_0x45728b);_0x495bfe(_0x45728b);});});}
\ No newline at end of file