Built motion from commit (unavailable).|2.5.13
[motion2.git] / server / api / chatInternalMessage / chatInternalMessage.rpc.js
index 166db6f..7ff06ee 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe72d=['redis','defaults','localhost','socket.io-emitter','./chatInternalMessage.socket','request','then','ChatInternalMessage,\x20%s,\x20%s','request\x20sent','debug','ChatInternalMessage,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','http'];(function(_0x47f473,_0x12eb07){var _0x55040d=function(_0xec9f13){while(--_0xec9f13){_0x47f473['push'](_0x47f473['shift']());}};_0x55040d(++_0x12eb07);}(_0xe72d,0x18b));var _0xde72=function(_0x1b6186,_0x1ec7f2){_0x1b6186=_0x1b6186-0x0;var _0x186121=_0xe72d[_0x1b6186];return _0x186121;};'use strict';var _=require(_0xde72('0x0'));var util=require(_0xde72('0x1'));var moment=require('moment');var BPromise=require(_0xde72('0x2'));var rs=require(_0xde72('0x3'));var fs=require('fs');var Redis=require(_0xde72('0x4'));var db=require(_0xde72('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xde72('0x6'));var config=require(_0xde72('0x7'));var jayson=require(_0xde72('0x8'));var client=jayson['client'][_0xde72('0x9')]({'port':0x232a});config[_0xde72('0xa')]=_[_0xde72('0xb')](config[_0xde72('0xa')],{'host':_0xde72('0xc'),'port':0x18eb});var socket=require(_0xde72('0xd'))(new Redis(config['redis']));require(_0xde72('0xe'))['register'](socket);function respondWithRpcPromise(_0x38bda0,_0x3c3183,_0x259e6d){return new BPromise(function(_0x2ab64c,_0x12e0f1){return client[_0xde72('0xf')](_0x38bda0,_0x259e6d)[_0xde72('0x10')](function(_0x315cde){logger['info'](_0xde72('0x11'),_0x3c3183,_0xde72('0x12'));logger[_0xde72('0x13')](_0xde72('0x14'),_0x3c3183,_0xde72('0x12'),JSON[_0xde72('0x15')](_0x315cde));if(_0x315cde[_0xde72('0x16')]){if(_0x315cde[_0xde72('0x16')]['code']===0x1f4){logger[_0xde72('0x16')](_0xde72('0x11'),_0x3c3183,_0x315cde['error'][_0xde72('0x17')]);return _0x12e0f1(_0x315cde[_0xde72('0x16')][_0xde72('0x17')]);}logger[_0xde72('0x16')](_0xde72('0x11'),_0x3c3183,_0x315cde[_0xde72('0x16')][_0xde72('0x17')]);return _0x2ab64c(_0x315cde[_0xde72('0x16')][_0xde72('0x17')]);}else{logger[_0xde72('0x18')](_0xde72('0x11'),_0x3c3183,_0xde72('0x12'));_0x2ab64c(_0x315cde[_0xde72('0x19')][_0xde72('0x17')]);}})[_0xde72('0x1a')](function(_0x483597){logger[_0xde72('0x16')](_0xde72('0x11'),_0x3c3183,_0x483597);_0x12e0f1(_0x483597);});});}
\ No newline at end of file
+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