Built motion from commit 47436d59.|2.6.7
[motion2.git] / server / api / chatGroup / chatGroup.rpc.js
index b6a1bad..ae2f7ba 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x088f=['lodash','util','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','./chatGroup.socket','register','request','info','ChatGroup,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch'];(function(_0xc3f291,_0x9b52e9){var _0x11e318=function(_0x355318){while(--_0x355318){_0xc3f291['push'](_0xc3f291['shift']());}};_0x11e318(++_0x9b52e9);}(_0x088f,0x152));var _0xf088=function(_0x1f82a1,_0x2324f4){_0x1f82a1=_0x1f82a1-0x0;var _0x5772d2=_0x088f[_0x1f82a1];return _0x5772d2;};'use strict';var _=require(_0xf088('0x0'));var util=require(_0xf088('0x1'));var moment=require('moment');var BPromise=require(_0xf088('0x2'));var rs=require(_0xf088('0x3'));var fs=require('fs');var Redis=require(_0xf088('0x4'));var db=require(_0xf088('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xf088('0x6'));var config=require(_0xf088('0x7'));var jayson=require(_0xf088('0x8'));var client=jayson[_0xf088('0x9')][_0xf088('0xa')]({'port':0x232a});config[_0xf088('0xb')]=_[_0xf088('0xc')](config[_0xf088('0xb')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xf088('0xb')]));require(_0xf088('0xd'))[_0xf088('0xe')](socket);function respondWithRpcPromise(_0x3e1b80,_0x24770c,_0x2e8b97){return new BPromise(function(_0x563515,_0x4d8e32){return client[_0xf088('0xf')](_0x3e1b80,_0x2e8b97)['then'](function(_0x4a95b9){logger[_0xf088('0x10')](_0xf088('0x11'),_0x24770c,_0xf088('0x12'));logger[_0xf088('0x13')]('ChatGroup,\x20%s,\x20%s,\x20%s',_0x24770c,_0xf088('0x12'),JSON[_0xf088('0x14')](_0x4a95b9));if(_0x4a95b9[_0xf088('0x15')]){if(_0x4a95b9[_0xf088('0x15')][_0xf088('0x16')]===0x1f4){logger[_0xf088('0x15')](_0xf088('0x11'),_0x24770c,_0x4a95b9[_0xf088('0x15')][_0xf088('0x17')]);return _0x4d8e32(_0x4a95b9[_0xf088('0x15')][_0xf088('0x17')]);}logger['error']('ChatGroup,\x20%s,\x20%s',_0x24770c,_0x4a95b9[_0xf088('0x15')][_0xf088('0x17')]);return _0x563515(_0x4a95b9['error'][_0xf088('0x17')]);}else{logger[_0xf088('0x10')]('ChatGroup,\x20%s,\x20%s',_0x24770c,_0xf088('0x12'));_0x563515(_0x4a95b9[_0xf088('0x18')][_0xf088('0x17')]);}})[_0xf088('0x19')](function(_0x2a3451){logger[_0xf088('0x15')](_0xf088('0x11'),_0x24770c,_0x2a3451);_0x4d8e32(_0x2a3451);});});}
\ No newline at end of file
+var _0x0a62=['request\x20sent','stringify','error','code','message','result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','client','http','redis','defaults','localhost','request','then','info','ChatGroup,\x20%s,\x20%s','ChatGroup,\x20%s,\x20%s,\x20%s'];(function(_0x7df4d,_0x3e1a4f){var _0x54e5c6=function(_0x109831){while(--_0x109831){_0x7df4d['push'](_0x7df4d['shift']());}};_0x54e5c6(++_0x3e1a4f);}(_0x0a62,0x119));var _0x20a6=function(_0x31ced5,_0x5d5415){_0x31ced5=_0x31ced5-0x0;var _0x10d9e5=_0x0a62[_0x31ced5];return _0x10d9e5;};'use strict';var _=require(_0x20a6('0x0'));var util=require(_0x20a6('0x1'));var moment=require(_0x20a6('0x2'));var BPromise=require(_0x20a6('0x3'));var rs=require(_0x20a6('0x4'));var fs=require('fs');var Redis=require(_0x20a6('0x5'));var db=require(_0x20a6('0x6'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x20a6('0x7'));var config=require(_0x20a6('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x20a6('0x9')][_0x20a6('0xa')]({'port':0x232a});config[_0x20a6('0xb')]=_[_0x20a6('0xc')](config[_0x20a6('0xb')],{'host':_0x20a6('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require('./chatGroup.socket')['register'](socket);function respondWithRpcPromise(_0x3d3329,_0x14db80,_0x90b698){return new BPromise(function(_0x13b2fa,_0x4ceb69){return client[_0x20a6('0xe')](_0x3d3329,_0x90b698)[_0x20a6('0xf')](function(_0x337b53){logger[_0x20a6('0x10')](_0x20a6('0x11'),_0x14db80,'request\x20sent');logger['debug'](_0x20a6('0x12'),_0x14db80,_0x20a6('0x13'),JSON[_0x20a6('0x14')](_0x337b53));if(_0x337b53[_0x20a6('0x15')]){if(_0x337b53[_0x20a6('0x15')][_0x20a6('0x16')]===0x1f4){logger[_0x20a6('0x15')]('ChatGroup,\x20%s,\x20%s',_0x14db80,_0x337b53[_0x20a6('0x15')][_0x20a6('0x17')]);return _0x4ceb69(_0x337b53[_0x20a6('0x15')]['message']);}logger['error'](_0x20a6('0x11'),_0x14db80,_0x337b53[_0x20a6('0x15')][_0x20a6('0x17')]);return _0x13b2fa(_0x337b53['error']['message']);}else{logger[_0x20a6('0x10')](_0x20a6('0x11'),_0x14db80,_0x20a6('0x13'));_0x13b2fa(_0x337b53[_0x20a6('0x18')]['message']);}})['catch'](function(_0x2ed059){logger[_0x20a6('0x15')](_0x20a6('0x11'),_0x14db80,_0x2ed059);_0x4ceb69(_0x2ed059);});});}
\ No newline at end of file