Built motion from commit a679711e.|2.6.15
[motion2.git] / server / api / chatGroup / chatGroup.rpc.js
index 73f1ee8..79dc279 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x180b=['http','redis','defaults','localhost','./chatGroup.socket','register','request','then','info','ChatGroup,\x20%s,\x20%s','request\x20sent','debug','ChatGroup,\x20%s,\x20%s,\x20%s','stringify','error','message','result','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client'];(function(_0x2a964a,_0x35c153){var _0x1a6ae9=function(_0x2fbd5e){while(--_0x2fbd5e){_0x2a964a['push'](_0x2a964a['shift']());}};_0x1a6ae9(++_0x35c153);}(_0x180b,0xdc));var _0xb180=function(_0x23edeb,_0x332d66){_0x23edeb=_0x23edeb-0x0;var _0xee1ec0=_0x180b[_0x23edeb];return _0xee1ec0;};'use strict';var _=require(_0xb180('0x0'));var util=require(_0xb180('0x1'));var moment=require(_0xb180('0x2'));var BPromise=require('bluebird');var rs=require(_0xb180('0x3'));var fs=require('fs');var Redis=require(_0xb180('0x4'));var db=require(_0xb180('0x5'))['db'];var utils=require(_0xb180('0x6'));var logger=require(_0xb180('0x7'))(_0xb180('0x8'));var config=require(_0xb180('0x9'));var jayson=require(_0xb180('0xa'));var client=jayson[_0xb180('0xb')][_0xb180('0xc')]({'port':0x232a});config[_0xb180('0xd')]=_[_0xb180('0xe')](config[_0xb180('0xd')],{'host':_0xb180('0xf'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0xb180('0x10'))[_0xb180('0x11')](socket);function respondWithRpcPromise(_0x3da265,_0x27ff83,_0x354e60){return new BPromise(function(_0x156227,_0x23c57a){return client[_0xb180('0x12')](_0x3da265,_0x354e60)[_0xb180('0x13')](function(_0x19fc78){logger[_0xb180('0x14')](_0xb180('0x15'),_0x27ff83,_0xb180('0x16'));logger[_0xb180('0x17')](_0xb180('0x18'),_0x27ff83,'request\x20sent',JSON[_0xb180('0x19')](_0x19fc78));if(_0x19fc78['error']){if(_0x19fc78[_0xb180('0x1a')]['code']===0x1f4){logger[_0xb180('0x1a')](_0xb180('0x15'),_0x27ff83,_0x19fc78[_0xb180('0x1a')]['message']);return _0x23c57a(_0x19fc78[_0xb180('0x1a')][_0xb180('0x1b')]);}logger[_0xb180('0x1a')](_0xb180('0x15'),_0x27ff83,_0x19fc78[_0xb180('0x1a')][_0xb180('0x1b')]);return _0x156227(_0x19fc78[_0xb180('0x1a')][_0xb180('0x1b')]);}else{logger['info'](_0xb180('0x15'),_0x27ff83,_0xb180('0x16'));_0x156227(_0x19fc78[_0xb180('0x1c')][_0xb180('0x1b')]);}})['catch'](function(_0x24cc3f){logger[_0xb180('0x1a')]('ChatGroup,\x20%s,\x20%s',_0x27ff83,_0x24cc3f);_0x23c57a(_0x24cc3f);});});}
\ No newline at end of file
+var _0x2caf=['request','then','ChatGroup,\x20%s,\x20%s','request\x20sent','ChatGroup,\x20%s,\x20%s,\x20%s','error','message','info','result','catch','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','defaults','socket.io-emitter','./chatGroup.socket','register'];(function(_0x117e78,_0x4c523c){var _0x4e6faa=function(_0x283b0c){while(--_0x283b0c){_0x117e78['push'](_0x117e78['shift']());}};_0x4e6faa(++_0x4c523c);}(_0x2caf,0x6a));var _0xf2ca=function(_0x401a8b,_0x88935b){_0x401a8b=_0x401a8b-0x0;var _0x18397c=_0x2caf[_0x401a8b];return _0x18397c;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0xf2ca('0x0'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xf2ca('0x1'));var db=require(_0xf2ca('0x2'))['db'];var utils=require(_0xf2ca('0x3'));var logger=require(_0xf2ca('0x4'))(_0xf2ca('0x5'));var config=require(_0xf2ca('0x6'));var jayson=require(_0xf2ca('0x7'));var client=jayson['client'][_0xf2ca('0x8')]({'port':0x232a});config[_0xf2ca('0x9')]=_[_0xf2ca('0xa')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0xf2ca('0xb'))(new Redis(config[_0xf2ca('0x9')]));require(_0xf2ca('0xc'))[_0xf2ca('0xd')](socket);function respondWithRpcPromise(_0x1c1afd,_0x5be288,_0x1ecd50){return new BPromise(function(_0x34d82a,_0x30e975){return client[_0xf2ca('0xe')](_0x1c1afd,_0x1ecd50)[_0xf2ca('0xf')](function(_0x328d80){logger['info'](_0xf2ca('0x10'),_0x5be288,_0xf2ca('0x11'));logger['debug'](_0xf2ca('0x12'),_0x5be288,_0xf2ca('0x11'),JSON['stringify'](_0x328d80));if(_0x328d80['error']){if(_0x328d80[_0xf2ca('0x13')]['code']===0x1f4){logger[_0xf2ca('0x13')](_0xf2ca('0x10'),_0x5be288,_0x328d80[_0xf2ca('0x13')][_0xf2ca('0x14')]);return _0x30e975(_0x328d80[_0xf2ca('0x13')][_0xf2ca('0x14')]);}logger[_0xf2ca('0x13')]('ChatGroup,\x20%s,\x20%s',_0x5be288,_0x328d80[_0xf2ca('0x13')]['message']);return _0x34d82a(_0x328d80[_0xf2ca('0x13')]['message']);}else{logger[_0xf2ca('0x15')](_0xf2ca('0x10'),_0x5be288,'request\x20sent');_0x34d82a(_0x328d80[_0xf2ca('0x16')][_0xf2ca('0x14')]);}})[_0xf2ca('0x17')](function(_0x310504){logger[_0xf2ca('0x13')](_0xf2ca('0x10'),_0x5be288,_0x310504);_0x30e975(_0x310504);});});}
\ No newline at end of file