Built motion from commit da24aabd.|2.6.20
[motion2.git] / server / api / chatGroup / chatGroup.rpc.js
index 72e0518..5b8e9a7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x13e3=['register','request','info','request\x20sent','debug','ChatGroup,\x20%s,\x20%s,\x20%s','stringify','error','code','ChatGroup,\x20%s,\x20%s','message','result','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','redis','defaults','./chatGroup.socket'];(function(_0x3e625c,_0x372847){var _0x3cc347=function(_0x1cfba4){while(--_0x1cfba4){_0x3e625c['push'](_0x3e625c['shift']());}};_0x3cc347(++_0x372847);}(_0x13e3,0x137));var _0x313e=function(_0x561771,_0x554760){_0x561771=_0x561771-0x0;var _0x54d16e=_0x13e3[_0x561771];return _0x54d16e;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x313e('0x0'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x313e('0x1'));var db=require(_0x313e('0x2'))['db'];var utils=require(_0x313e('0x3'));var logger=require(_0x313e('0x4'))('rpc');var config=require(_0x313e('0x5'));var jayson=require(_0x313e('0x6'));var client=jayson[_0x313e('0x7')]['http']({'port':0x232a});config[_0x313e('0x8')]=_[_0x313e('0x9')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x313e('0x8')]));require(_0x313e('0xa'))[_0x313e('0xb')](socket);function respondWithRpcPromise(_0x3c39cc,_0x474546,_0x3bc88e){return new BPromise(function(_0x5b7550,_0x16d722){return client[_0x313e('0xc')](_0x3c39cc,_0x3bc88e)['then'](function(_0x359e03){logger[_0x313e('0xd')]('ChatGroup,\x20%s,\x20%s',_0x474546,_0x313e('0xe'));logger[_0x313e('0xf')](_0x313e('0x10'),_0x474546,_0x313e('0xe'),JSON[_0x313e('0x11')](_0x359e03));if(_0x359e03['error']){if(_0x359e03[_0x313e('0x12')][_0x313e('0x13')]===0x1f4){logger[_0x313e('0x12')](_0x313e('0x14'),_0x474546,_0x359e03[_0x313e('0x12')][_0x313e('0x15')]);return _0x16d722(_0x359e03[_0x313e('0x12')][_0x313e('0x15')]);}logger[_0x313e('0x12')](_0x313e('0x14'),_0x474546,_0x359e03['error'][_0x313e('0x15')]);return _0x5b7550(_0x359e03[_0x313e('0x12')][_0x313e('0x15')]);}else{logger[_0x313e('0xd')](_0x313e('0x14'),_0x474546,'request\x20sent');_0x5b7550(_0x359e03[_0x313e('0x16')][_0x313e('0x15')]);}})['catch'](function(_0x3fbce6){logger['error'](_0x313e('0x14'),_0x474546,_0x3fbce6);_0x16d722(_0x3fbce6);});});}
\ No newline at end of file
+var _0x83f7=['message','result','lodash','util','moment','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','localhost','socket.io-emitter','register','request','then','info','request\x20sent','debug','stringify','error','code','ChatGroup,\x20%s,\x20%s'];(function(_0x4be009,_0x3b5635){var _0x2eddfc=function(_0x500cc0){while(--_0x500cc0){_0x4be009['push'](_0x4be009['shift']());}};_0x2eddfc(++_0x3b5635);}(_0x83f7,0x84));var _0x783f=function(_0x14850d,_0xac0cbd){_0x14850d=_0x14850d-0x0;var _0x3f7406=_0x83f7[_0x14850d];return _0x3f7406;};'use strict';var _=require(_0x783f('0x0'));var util=require(_0x783f('0x1'));var moment=require(_0x783f('0x2'));var BPromise=require('bluebird');var rs=require(_0x783f('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x783f('0x4'));var logger=require(_0x783f('0x5'))(_0x783f('0x6'));var config=require(_0x783f('0x7'));var jayson=require(_0x783f('0x8'));var client=jayson[_0x783f('0x9')][_0x783f('0xa')]({'port':0x232a});config[_0x783f('0xb')]=_['defaults'](config[_0x783f('0xb')],{'host':_0x783f('0xc'),'port':0x18eb});var socket=require(_0x783f('0xd'))(new Redis(config[_0x783f('0xb')]));require('./chatGroup.socket')[_0x783f('0xe')](socket);function respondWithRpcPromise(_0x53b61d,_0x195d40,_0x3f6d1b){return new BPromise(function(_0xc94050,_0x3deb73){return client[_0x783f('0xf')](_0x53b61d,_0x3f6d1b)[_0x783f('0x10')](function(_0x1661c9){logger[_0x783f('0x11')]('ChatGroup,\x20%s,\x20%s',_0x195d40,_0x783f('0x12'));logger[_0x783f('0x13')]('ChatGroup,\x20%s,\x20%s,\x20%s',_0x195d40,_0x783f('0x12'),JSON[_0x783f('0x14')](_0x1661c9));if(_0x1661c9[_0x783f('0x15')]){if(_0x1661c9[_0x783f('0x15')][_0x783f('0x16')]===0x1f4){logger['error'](_0x783f('0x17'),_0x195d40,_0x1661c9[_0x783f('0x15')][_0x783f('0x18')]);return _0x3deb73(_0x1661c9['error']['message']);}logger[_0x783f('0x15')](_0x783f('0x17'),_0x195d40,_0x1661c9[_0x783f('0x15')][_0x783f('0x18')]);return _0xc94050(_0x1661c9[_0x783f('0x15')][_0x783f('0x18')]);}else{logger['info'](_0x783f('0x17'),_0x195d40,_0x783f('0x12'));_0xc94050(_0x1661c9[_0x783f('0x19')][_0x783f('0x18')]);}})['catch'](function(_0x1ef1bb){logger[_0x783f('0x15')]('ChatGroup,\x20%s,\x20%s',_0x195d40,_0x1ef1bb);_0x3deb73(_0x1ef1bb);});});}
\ No newline at end of file