Built motion from commit 44b1f254.|2.6.26
[motion2.git] / server / api / chatGroup / chatGroup.rpc.js
index e9ea356..3d76203 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x51f2=['message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','redis','localhost','socket.io-emitter','register','request','then','ChatGroup,\x20%s,\x20%s','request\x20sent','debug','ChatGroup,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x5cdede,_0x5287a5){var _0x274b8d=function(_0x539ce8){while(--_0x539ce8){_0x5cdede['push'](_0x5cdede['shift']());}};_0x274b8d(++_0x5287a5);}(_0x51f2,0xeb));var _0x251f=function(_0x1dd28a,_0x82c27d){_0x1dd28a=_0x1dd28a-0x0;var _0x47c8bf=_0x51f2[_0x1dd28a];return _0x47c8bf;};'use strict';var _=require(_0x251f('0x0'));var util=require(_0x251f('0x1'));var moment=require(_0x251f('0x2'));var BPromise=require(_0x251f('0x3'));var rs=require(_0x251f('0x4'));var fs=require('fs');var Redis=require(_0x251f('0x5'));var db=require(_0x251f('0x6'))['db'];var utils=require(_0x251f('0x7'));var logger=require(_0x251f('0x8'))('rpc');var config=require(_0x251f('0x9'));var jayson=require(_0x251f('0xa'));var client=jayson[_0x251f('0xb')][_0x251f('0xc')]({'port':0x232a});config[_0x251f('0xd')]=_['defaults'](config[_0x251f('0xd')],{'host':_0x251f('0xe'),'port':0x18eb});var socket=require(_0x251f('0xf'))(new Redis(config[_0x251f('0xd')]));require('./chatGroup.socket')[_0x251f('0x10')](socket);function respondWithRpcPromise(_0x2ca056,_0x863651,_0x35694d){return new BPromise(function(_0x5aedae,_0x12e9f7){return client[_0x251f('0x11')](_0x2ca056,_0x35694d)[_0x251f('0x12')](function(_0x1c851f){logger['info'](_0x251f('0x13'),_0x863651,_0x251f('0x14'));logger[_0x251f('0x15')](_0x251f('0x16'),_0x863651,_0x251f('0x14'),JSON[_0x251f('0x17')](_0x1c851f));if(_0x1c851f[_0x251f('0x18')]){if(_0x1c851f[_0x251f('0x18')][_0x251f('0x19')]===0x1f4){logger[_0x251f('0x18')](_0x251f('0x13'),_0x863651,_0x1c851f['error'][_0x251f('0x1a')]);return _0x12e9f7(_0x1c851f[_0x251f('0x18')]['message']);}logger[_0x251f('0x18')](_0x251f('0x13'),_0x863651,_0x1c851f[_0x251f('0x18')][_0x251f('0x1a')]);return _0x5aedae(_0x1c851f[_0x251f('0x18')]['message']);}else{logger['info'](_0x251f('0x13'),_0x863651,_0x251f('0x14'));_0x5aedae(_0x1c851f[_0x251f('0x1b')][_0x251f('0x1a')]);}})[_0x251f('0x1c')](function(_0x49d2eb){logger[_0x251f('0x18')](_0x251f('0x13'),_0x863651,_0x49d2eb);_0x12e9f7(_0x49d2eb);});});}
\ No newline at end of file
+var _0x3f19=['info','result','catch','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','socket.io-emitter','./chatGroup.socket','register','request','ChatGroup,\x20%s,\x20%s','request\x20sent','ChatGroup,\x20%s,\x20%s,\x20%s','error','code','message'];(function(_0x1e2f07,_0x4da21b){var _0x42d8c1=function(_0x466378){while(--_0x466378){_0x1e2f07['push'](_0x1e2f07['shift']());}};_0x42d8c1(++_0x4da21b);}(_0x3f19,0x1f1));var _0x93f1=function(_0x1d6eb4,_0x2a20d7){_0x1d6eb4=_0x1d6eb4-0x0;var _0x1277f0=_0x3f19[_0x1d6eb4];return _0x1277f0;};'use strict';var _=require('lodash');var util=require(_0x93f1('0x0'));var moment=require('moment');var BPromise=require(_0x93f1('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x93f1('0x2'));var db=require(_0x93f1('0x3'))['db'];var utils=require(_0x93f1('0x4'));var logger=require(_0x93f1('0x5'))(_0x93f1('0x6'));var config=require(_0x93f1('0x7'));var jayson=require(_0x93f1('0x8'));var client=jayson[_0x93f1('0x9')][_0x93f1('0xa')]({'port':0x232a});config[_0x93f1('0xb')]=_[_0x93f1('0xc')](config[_0x93f1('0xb')],{'host':'localhost','port':0x18eb});var socket=require(_0x93f1('0xd'))(new Redis(config['redis']));require(_0x93f1('0xe'))[_0x93f1('0xf')](socket);function respondWithRpcPromise(_0x4052b4,_0x45d171,_0x30fed4){return new BPromise(function(_0x5c8cda,_0x4a6776){return client[_0x93f1('0x10')](_0x4052b4,_0x30fed4)['then'](function(_0x3eb625){logger['info'](_0x93f1('0x11'),_0x45d171,_0x93f1('0x12'));logger['debug'](_0x93f1('0x13'),_0x45d171,_0x93f1('0x12'),JSON['stringify'](_0x3eb625));if(_0x3eb625[_0x93f1('0x14')]){if(_0x3eb625[_0x93f1('0x14')][_0x93f1('0x15')]===0x1f4){logger[_0x93f1('0x14')](_0x93f1('0x11'),_0x45d171,_0x3eb625[_0x93f1('0x14')][_0x93f1('0x16')]);return _0x4a6776(_0x3eb625[_0x93f1('0x14')][_0x93f1('0x16')]);}logger['error']('ChatGroup,\x20%s,\x20%s',_0x45d171,_0x3eb625[_0x93f1('0x14')][_0x93f1('0x16')]);return _0x5c8cda(_0x3eb625[_0x93f1('0x14')][_0x93f1('0x16')]);}else{logger[_0x93f1('0x17')]('ChatGroup,\x20%s,\x20%s',_0x45d171,_0x93f1('0x12'));_0x5c8cda(_0x3eb625[_0x93f1('0x18')][_0x93f1('0x16')]);}})[_0x93f1('0x19')](function(_0x31f4d9){logger[_0x93f1('0x14')](_0x93f1('0x11'),_0x45d171,_0x31f4d9);_0x4a6776(_0x31f4d9);});});}
\ No newline at end of file