Built motion from commit 3e059bc2.|2.5.32
[motion2.git] / server / api / chatGroup / chatGroup.rpc.js
index 591a795..19257b6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x679e=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','http','redis','defaults','localhost','socket.io-emitter','./chatGroup.socket','register','request','then','info','ChatGroup,\x20%s,\x20%s','request\x20sent','debug','ChatGroup,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','util','bluebird'];(function(_0x524276,_0x26a40c){var _0x134c79=function(_0x51f48f){while(--_0x51f48f){_0x524276['push'](_0x524276['shift']());}};_0x134c79(++_0x26a40c);}(_0x679e,0x120));var _0xe679=function(_0x5bb92f,_0x180a56){_0x5bb92f=_0x5bb92f-0x0;var _0x2b80f5=_0x679e[_0x5bb92f];return _0x2b80f5;};'use strict';var _=require('lodash');var util=require(_0xe679('0x0'));var moment=require('moment');var BPromise=require(_0xe679('0x1'));var rs=require(_0xe679('0x2'));var fs=require('fs');var Redis=require(_0xe679('0x3'));var db=require(_0xe679('0x4'))['db'];var utils=require(_0xe679('0x5'));var logger=require(_0xe679('0x6'))(_0xe679('0x7'));var config=require('../../config/environment');var jayson=require(_0xe679('0x8'));var client=jayson['client'][_0xe679('0x9')]({'port':0x232a});config[_0xe679('0xa')]=_[_0xe679('0xb')](config[_0xe679('0xa')],{'host':_0xe679('0xc'),'port':0x18eb});var socket=require(_0xe679('0xd'))(new Redis(config[_0xe679('0xa')]));require(_0xe679('0xe'))[_0xe679('0xf')](socket);function respondWithRpcPromise(_0x3d50ee,_0x4affaa,_0x408d80){return new BPromise(function(_0x425ba5,_0x366902){return client[_0xe679('0x10')](_0x3d50ee,_0x408d80)[_0xe679('0x11')](function(_0x486f44){logger[_0xe679('0x12')](_0xe679('0x13'),_0x4affaa,_0xe679('0x14'));logger[_0xe679('0x15')](_0xe679('0x16'),_0x4affaa,_0xe679('0x14'),JSON[_0xe679('0x17')](_0x486f44));if(_0x486f44[_0xe679('0x18')]){if(_0x486f44[_0xe679('0x18')][_0xe679('0x19')]===0x1f4){logger[_0xe679('0x18')](_0xe679('0x13'),_0x4affaa,_0x486f44[_0xe679('0x18')][_0xe679('0x1a')]);return _0x366902(_0x486f44[_0xe679('0x18')][_0xe679('0x1a')]);}logger['error'](_0xe679('0x13'),_0x4affaa,_0x486f44[_0xe679('0x18')][_0xe679('0x1a')]);return _0x425ba5(_0x486f44['error'][_0xe679('0x1a')]);}else{logger[_0xe679('0x12')](_0xe679('0x13'),_0x4affaa,_0xe679('0x14'));_0x425ba5(_0x486f44[_0xe679('0x1b')][_0xe679('0x1a')]);}})[_0xe679('0x1c')](function(_0x4e8c29){logger['error']('ChatGroup,\x20%s,\x20%s',_0x4affaa,_0x4e8c29);_0x366902(_0x4e8c29);});});}
\ 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