Built motion from commit 3e059bc2.|2.5.32
[motion2.git] / server / api / chatGroup / chatGroup.rpc.js
index 9592250..19257b6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa0b6=['lodash','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','client','http','defaults','redis','socket.io-emitter','./chatGroup.socket','register','then','info','ChatGroup,\x20%s,\x20%s','debug','ChatGroup,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch'];(function(_0x34d6bd,_0x55b744){var _0x248396=function(_0x23f061){while(--_0x23f061){_0x34d6bd['push'](_0x34d6bd['shift']());}};_0x248396(++_0x55b744);}(_0xa0b6,0xe1));var _0x6a0b=function(_0x557fd2,_0x2c0a7a){_0x557fd2=_0x557fd2-0x0;var _0x1b54a2=_0xa0b6[_0x557fd2];return _0x1b54a2;};'use strict';var _=require(_0x6a0b('0x0'));var util=require(_0x6a0b('0x1'));var moment=require(_0x6a0b('0x2'));var BPromise=require(_0x6a0b('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x6a0b('0x4'))['db'];var utils=require(_0x6a0b('0x5'));var logger=require(_0x6a0b('0x6'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x6a0b('0x7')][_0x6a0b('0x8')]({'port':0x232a});config['redis']=_[_0x6a0b('0x9')](config[_0x6a0b('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0x6a0b('0xb'))(new Redis(config[_0x6a0b('0xa')]));require(_0x6a0b('0xc'))[_0x6a0b('0xd')](socket);function respondWithRpcPromise(_0x447a4a,_0x2931f6,_0x21ac86){return new BPromise(function(_0x480e7d,_0x13adac){return client['request'](_0x447a4a,_0x21ac86)[_0x6a0b('0xe')](function(_0x2339bc){logger[_0x6a0b('0xf')](_0x6a0b('0x10'),_0x2931f6,'request\x20sent');logger[_0x6a0b('0x11')](_0x6a0b('0x12'),_0x2931f6,_0x6a0b('0x13'),JSON[_0x6a0b('0x14')](_0x2339bc));if(_0x2339bc[_0x6a0b('0x15')]){if(_0x2339bc[_0x6a0b('0x15')][_0x6a0b('0x16')]===0x1f4){logger[_0x6a0b('0x15')]('ChatGroup,\x20%s,\x20%s',_0x2931f6,_0x2339bc['error']['message']);return _0x13adac(_0x2339bc['error'][_0x6a0b('0x17')]);}logger[_0x6a0b('0x15')]('ChatGroup,\x20%s,\x20%s',_0x2931f6,_0x2339bc[_0x6a0b('0x15')]['message']);return _0x480e7d(_0x2339bc['error'][_0x6a0b('0x17')]);}else{logger[_0x6a0b('0xf')]('ChatGroup,\x20%s,\x20%s',_0x2931f6,_0x6a0b('0x13'));_0x480e7d(_0x2339bc['result'][_0x6a0b('0x17')]);}})[_0x6a0b('0x18')](function(_0x2a73d2){logger[_0x6a0b('0x15')](_0x6a0b('0x10'),_0x2931f6,_0x2a73d2);_0x13adac(_0x2a73d2);});});}
\ No newline at end of file
+var _0x5f96=['debug','ChatGroup,\x20%s,\x20%s,\x20%s','stringify','error','message','info','request\x20sent','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','http','redis','localhost','socket.io-emitter','./chatGroup.socket','register','request','ChatGroup,\x20%s,\x20%s'];(function(_0x2c165a,_0x74dd4e){var _0x486c1a=function(_0x17ee1d){while(--_0x17ee1d){_0x2c165a['push'](_0x2c165a['shift']());}};_0x486c1a(++_0x74dd4e);}(_0x5f96,0x75));var _0x65f9=function(_0x2c7618,_0x26be9c){_0x2c7618=_0x2c7618-0x0;var _0x5ce3f0=_0x5f96[_0x2c7618];return _0x5ce3f0;};'use strict';var _=require(_0x65f9('0x0'));var util=require(_0x65f9('0x1'));var moment=require(_0x65f9('0x2'));var BPromise=require(_0x65f9('0x3'));var rs=require(_0x65f9('0x4'));var fs=require('fs');var Redis=require(_0x65f9('0x5'));var db=require(_0x65f9('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x65f9('0x7'))('rpc');var config=require(_0x65f9('0x8'));var jayson=require(_0x65f9('0x9'));var client=jayson['client'][_0x65f9('0xa')]({'port':0x232a});config[_0x65f9('0xb')]=_['defaults'](config[_0x65f9('0xb')],{'host':_0x65f9('0xc'),'port':0x18eb});var socket=require(_0x65f9('0xd'))(new Redis(config[_0x65f9('0xb')]));require(_0x65f9('0xe'))[_0x65f9('0xf')](socket);function respondWithRpcPromise(_0x594509,_0x52991e,_0x177256){return new BPromise(function(_0x296301,_0x8b086){return client[_0x65f9('0x10')](_0x594509,_0x177256)['then'](function(_0x1ea8bc){logger['info'](_0x65f9('0x11'),_0x52991e,'request\x20sent');logger[_0x65f9('0x12')](_0x65f9('0x13'),_0x52991e,'request\x20sent',JSON[_0x65f9('0x14')](_0x1ea8bc));if(_0x1ea8bc[_0x65f9('0x15')]){if(_0x1ea8bc[_0x65f9('0x15')]['code']===0x1f4){logger[_0x65f9('0x15')]('ChatGroup,\x20%s,\x20%s',_0x52991e,_0x1ea8bc[_0x65f9('0x15')][_0x65f9('0x16')]);return _0x8b086(_0x1ea8bc['error'][_0x65f9('0x16')]);}logger[_0x65f9('0x15')]('ChatGroup,\x20%s,\x20%s',_0x52991e,_0x1ea8bc['error'][_0x65f9('0x16')]);return _0x296301(_0x1ea8bc[_0x65f9('0x15')][_0x65f9('0x16')]);}else{logger[_0x65f9('0x17')](_0x65f9('0x11'),_0x52991e,_0x65f9('0x18'));_0x296301(_0x1ea8bc[_0x65f9('0x19')][_0x65f9('0x16')]);}})[_0x65f9('0x1a')](function(_0x410e06){logger['error']('ChatGroup,\x20%s,\x20%s',_0x52991e,_0x410e06);_0x8b086(_0x410e06);});});}
\ No newline at end of file