Built motion from commit da24aabd.|2.6.20
[motion2.git] / server / api / chatGroup / chatGroup.rpc.js
index f798b2c..5b8e9a7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1403=['jayson/promise','client','http','redis','defaults','localhost','./chatGroup.socket','register','request','then','info','request\x20sent','debug','stringify','error','code','message','result','catch','ChatGroup,\x20%s,\x20%s','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc'];(function(_0x5d54cf,_0x1a5506){var _0x45be84=function(_0x3d015b){while(--_0x3d015b){_0x5d54cf['push'](_0x5d54cf['shift']());}};_0x45be84(++_0x1a5506);}(_0x1403,0x153));var _0x3140=function(_0x51088e,_0x159440){_0x51088e=_0x51088e-0x0;var _0x500f49=_0x1403[_0x51088e];return _0x500f49;};'use strict';var _=require(_0x3140('0x0'));var util=require(_0x3140('0x1'));var moment=require(_0x3140('0x2'));var BPromise=require(_0x3140('0x3'));var rs=require(_0x3140('0x4'));var fs=require('fs');var Redis=require(_0x3140('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x3140('0x6'));var logger=require(_0x3140('0x7'))(_0x3140('0x8'));var config=require('../../config/environment');var jayson=require(_0x3140('0x9'));var client=jayson[_0x3140('0xa')][_0x3140('0xb')]({'port':0x232a});config[_0x3140('0xc')]=_[_0x3140('0xd')](config['redis'],{'host':_0x3140('0xe'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x3140('0xc')]));require(_0x3140('0xf'))[_0x3140('0x10')](socket);function respondWithRpcPromise(_0x799f2f,_0x25f8fc,_0x3af009){return new BPromise(function(_0x2bce8f,_0x410b7f){return client[_0x3140('0x11')](_0x799f2f,_0x3af009)[_0x3140('0x12')](function(_0xc6b952){logger[_0x3140('0x13')]('ChatGroup,\x20%s,\x20%s',_0x25f8fc,_0x3140('0x14'));logger[_0x3140('0x15')]('ChatGroup,\x20%s,\x20%s,\x20%s',_0x25f8fc,_0x3140('0x14'),JSON[_0x3140('0x16')](_0xc6b952));if(_0xc6b952[_0x3140('0x17')]){if(_0xc6b952['error'][_0x3140('0x18')]===0x1f4){logger[_0x3140('0x17')]('ChatGroup,\x20%s,\x20%s',_0x25f8fc,_0xc6b952['error']['message']);return _0x410b7f(_0xc6b952[_0x3140('0x17')][_0x3140('0x19')]);}logger[_0x3140('0x17')]('ChatGroup,\x20%s,\x20%s',_0x25f8fc,_0xc6b952[_0x3140('0x17')]['message']);return _0x2bce8f(_0xc6b952[_0x3140('0x17')][_0x3140('0x19')]);}else{logger[_0x3140('0x13')]('ChatGroup,\x20%s,\x20%s',_0x25f8fc,_0x3140('0x14'));_0x2bce8f(_0xc6b952[_0x3140('0x1a')][_0x3140('0x19')]);}})[_0x3140('0x1b')](function(_0x369a5e){logger[_0x3140('0x17')](_0x3140('0x1c'),_0x25f8fc,_0x369a5e);_0x410b7f(_0x369a5e);});});}
\ 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