Built motion from commit (unavailable).|2.5.23
[motion2.git] / server / api / chatInternalMessage / chatInternalMessage.rpc.js
index 7ff06ee..a768bf5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcc9c=['http','redis','defaults','socket.io-emitter','./chatInternalMessage.socket','register','request','then','ChatInternalMessage,\x20%s,\x20%s','request\x20sent','debug','ChatInternalMessage,\x20%s,\x20%s,\x20%s','stringify','code','error','message','info','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','jayson/promise','client'];(function(_0x139a3c,_0x4fc883){var _0x2b375b=function(_0x525dbf){while(--_0x525dbf){_0x139a3c['push'](_0x139a3c['shift']());}};_0x2b375b(++_0x4fc883);}(_0xcc9c,0xfb));var _0xccc9=function(_0x29b149,_0x2f7315){_0x29b149=_0x29b149-0x0;var _0x2da8d7=_0xcc9c[_0x29b149];return _0x2da8d7;};'use strict';var _=require(_0xccc9('0x0'));var util=require(_0xccc9('0x1'));var moment=require(_0xccc9('0x2'));var BPromise=require(_0xccc9('0x3'));var rs=require(_0xccc9('0x4'));var fs=require('fs');var Redis=require(_0xccc9('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xccc9('0x6'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require(_0xccc9('0x7'));var client=jayson[_0xccc9('0x8')][_0xccc9('0x9')]({'port':0x232a});config[_0xccc9('0xa')]=_[_0xccc9('0xb')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0xccc9('0xc'))(new Redis(config[_0xccc9('0xa')]));require(_0xccc9('0xd'))[_0xccc9('0xe')](socket);function respondWithRpcPromise(_0x2f7f02,_0x1856c6,_0x1bdb1d){return new BPromise(function(_0x12e4f8,_0x21a9a6){return client[_0xccc9('0xf')](_0x2f7f02,_0x1bdb1d)[_0xccc9('0x10')](function(_0x5dc59d){logger['info'](_0xccc9('0x11'),_0x1856c6,_0xccc9('0x12'));logger[_0xccc9('0x13')](_0xccc9('0x14'),_0x1856c6,_0xccc9('0x12'),JSON[_0xccc9('0x15')](_0x5dc59d));if(_0x5dc59d['error']){if(_0x5dc59d['error'][_0xccc9('0x16')]===0x1f4){logger[_0xccc9('0x17')](_0xccc9('0x11'),_0x1856c6,_0x5dc59d[_0xccc9('0x17')]['message']);return _0x21a9a6(_0x5dc59d['error'][_0xccc9('0x18')]);}logger['error'](_0xccc9('0x11'),_0x1856c6,_0x5dc59d['error'][_0xccc9('0x18')]);return _0x12e4f8(_0x5dc59d['error'][_0xccc9('0x18')]);}else{logger[_0xccc9('0x19')](_0xccc9('0x11'),_0x1856c6,_0xccc9('0x12'));_0x12e4f8(_0x5dc59d['result'][_0xccc9('0x18')]);}})['catch'](function(_0x340b38){logger[_0xccc9('0x17')](_0xccc9('0x11'),_0x1856c6,_0x340b38);_0x21a9a6(_0x340b38);});});}
\ No newline at end of file
+var _0xb713=['../../config/utils','../../config/logger','jayson/promise','client','redis','defaults','socket.io-emitter','request','request\x20sent','debug','ChatInternalMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','ChatInternalMessage,\x20%s,\x20%s','info','result','catch','lodash','util','moment','bluebird','randomstring','ioredis'];(function(_0x20a558,_0x160e0e){var _0x53d3f7=function(_0x259bd8){while(--_0x259bd8){_0x20a558['push'](_0x20a558['shift']());}};_0x53d3f7(++_0x160e0e);}(_0xb713,0x77));var _0x3b71=function(_0x54a9e3,_0x4a3813){_0x54a9e3=_0x54a9e3-0x0;var _0x247cce=_0xb713[_0x54a9e3];return _0x247cce;};'use strict';var _=require(_0x3b71('0x0'));var util=require(_0x3b71('0x1'));var moment=require(_0x3b71('0x2'));var BPromise=require(_0x3b71('0x3'));var rs=require(_0x3b71('0x4'));var fs=require('fs');var Redis=require(_0x3b71('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x3b71('0x6'));var logger=require(_0x3b71('0x7'))('rpc');var config=require('../../config/environment');var jayson=require(_0x3b71('0x8'));var client=jayson[_0x3b71('0x9')]['http']({'port':0x232a});config[_0x3b71('0xa')]=_[_0x3b71('0xb')](config[_0x3b71('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0x3b71('0xc'))(new Redis(config[_0x3b71('0xa')]));require('./chatInternalMessage.socket')['register'](socket);function respondWithRpcPromise(_0x276c75,_0x4ede4f,_0x4c76fb){return new BPromise(function(_0x3cac40,_0xfa99d3){return client[_0x3b71('0xd')](_0x276c75,_0x4c76fb)['then'](function(_0x4116fc){logger['info']('ChatInternalMessage,\x20%s,\x20%s',_0x4ede4f,_0x3b71('0xe'));logger[_0x3b71('0xf')](_0x3b71('0x10'),_0x4ede4f,_0x3b71('0xe'),JSON[_0x3b71('0x11')](_0x4116fc));if(_0x4116fc[_0x3b71('0x12')]){if(_0x4116fc[_0x3b71('0x12')][_0x3b71('0x13')]===0x1f4){logger[_0x3b71('0x12')]('ChatInternalMessage,\x20%s,\x20%s',_0x4ede4f,_0x4116fc[_0x3b71('0x12')]['message']);return _0xfa99d3(_0x4116fc[_0x3b71('0x12')][_0x3b71('0x14')]);}logger['error'](_0x3b71('0x15'),_0x4ede4f,_0x4116fc[_0x3b71('0x12')][_0x3b71('0x14')]);return _0x3cac40(_0x4116fc[_0x3b71('0x12')][_0x3b71('0x14')]);}else{logger[_0x3b71('0x16')](_0x3b71('0x15'),_0x4ede4f,'request\x20sent');_0x3cac40(_0x4116fc[_0x3b71('0x17')]['message']);}})[_0x3b71('0x18')](function(_0x1dacc0){logger[_0x3b71('0x12')](_0x3b71('0x15'),_0x4ede4f,_0x1dacc0);_0xfa99d3(_0x1dacc0);});});}
\ No newline at end of file