Built motion from commit 3e059bc2.|2.5.32
[motion2.git] / server / api / chatGroup / chatGroup.rpc.js
index 610d42d..19257b6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2707=['../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','defaults','redis','./chatGroup.socket','register','request','then','request\x20sent','debug','stringify','error','ChatGroup,\x20%s,\x20%s','message','info','result','catch','util','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x397e5f,_0x454c8f){var _0x5302b8=function(_0x1a29ef){while(--_0x1a29ef){_0x397e5f['push'](_0x397e5f['shift']());}};_0x5302b8(++_0x454c8f);}(_0x2707,0x167));var _0x7270=function(_0x307d86,_0x9264f2){_0x307d86=_0x307d86-0x0;var _0x361745=_0x2707[_0x307d86];return _0x361745;};'use strict';var _=require('lodash');var util=require(_0x7270('0x0'));var moment=require('moment');var BPromise=require(_0x7270('0x1'));var rs=require(_0x7270('0x2'));var fs=require('fs');var Redis=require(_0x7270('0x3'));var db=require(_0x7270('0x4'))['db'];var utils=require(_0x7270('0x5'));var logger=require(_0x7270('0x6'))(_0x7270('0x7'));var config=require(_0x7270('0x8'));var jayson=require(_0x7270('0x9'));var client=jayson[_0x7270('0xa')]['http']({'port':0x232a});config['redis']=_[_0x7270('0xb')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x7270('0xc')]));require(_0x7270('0xd'))[_0x7270('0xe')](socket);function respondWithRpcPromise(_0x542101,_0x65c57,_0x332a54){return new BPromise(function(_0x5a85a3,_0x4019de){return client[_0x7270('0xf')](_0x542101,_0x332a54)[_0x7270('0x10')](function(_0xec9777){logger['info']('ChatGroup,\x20%s,\x20%s',_0x65c57,_0x7270('0x11'));logger[_0x7270('0x12')]('ChatGroup,\x20%s,\x20%s,\x20%s',_0x65c57,_0x7270('0x11'),JSON[_0x7270('0x13')](_0xec9777));if(_0xec9777[_0x7270('0x14')]){if(_0xec9777[_0x7270('0x14')]['code']===0x1f4){logger[_0x7270('0x14')](_0x7270('0x15'),_0x65c57,_0xec9777[_0x7270('0x14')][_0x7270('0x16')]);return _0x4019de(_0xec9777[_0x7270('0x14')][_0x7270('0x16')]);}logger[_0x7270('0x14')]('ChatGroup,\x20%s,\x20%s',_0x65c57,_0xec9777[_0x7270('0x14')][_0x7270('0x16')]);return _0x5a85a3(_0xec9777[_0x7270('0x14')][_0x7270('0x16')]);}else{logger[_0x7270('0x17')](_0x7270('0x15'),_0x65c57,_0x7270('0x11'));_0x5a85a3(_0xec9777[_0x7270('0x18')][_0x7270('0x16')]);}})[_0x7270('0x19')](function(_0x55a017){logger[_0x7270('0x14')](_0x7270('0x15'),_0x65c57,_0x55a017);_0x4019de(_0x55a017);});});}
\ 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