Built motion from commit 9d7072cc.|2.5.39
[motion2.git] / server / api / chatInternalMessage / chatInternalMessage.rpc.js
index 611a01c..3a24a76 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x009f=['util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','client','redis','localhost','socket.io-emitter','./chatInternalMessage.socket','request','info','request\x20sent','debug','stringify','error','ChatInternalMessage,\x20%s,\x20%s','message','lodash'];(function(_0x92ad8e,_0x42b381){var _0x1b2610=function(_0x3a7635){while(--_0x3a7635){_0x92ad8e['push'](_0x92ad8e['shift']());}};_0x1b2610(++_0x42b381);}(_0x009f,0x1b4));var _0xf009=function(_0x3987a1,_0x447793){_0x3987a1=_0x3987a1-0x0;var _0xe2596e=_0x009f[_0x3987a1];return _0xe2596e;};'use strict';var _=require(_0xf009('0x0'));var util=require(_0xf009('0x1'));var moment=require(_0xf009('0x2'));var BPromise=require(_0xf009('0x3'));var rs=require(_0xf009('0x4'));var fs=require('fs');var Redis=require(_0xf009('0x5'));var db=require(_0xf009('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0xf009('0x7'))(_0xf009('0x8'));var config=require(_0xf009('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xf009('0xa')]['http']({'port':0x232a});config[_0xf009('0xb')]=_['defaults'](config[_0xf009('0xb')],{'host':_0xf009('0xc'),'port':0x18eb});var socket=require(_0xf009('0xd'))(new Redis(config[_0xf009('0xb')]));require(_0xf009('0xe'))['register'](socket);function respondWithRpcPromise(_0x326291,_0x36db1c,_0x4f55a9){return new BPromise(function(_0x549010,_0x4c1057){return client[_0xf009('0xf')](_0x326291,_0x4f55a9)['then'](function(_0x5a54e9){logger[_0xf009('0x10')]('ChatInternalMessage,\x20%s,\x20%s',_0x36db1c,_0xf009('0x11'));logger[_0xf009('0x12')]('ChatInternalMessage,\x20%s,\x20%s,\x20%s',_0x36db1c,_0xf009('0x11'),JSON[_0xf009('0x13')](_0x5a54e9));if(_0x5a54e9['error']){if(_0x5a54e9['error']['code']===0x1f4){logger[_0xf009('0x14')](_0xf009('0x15'),_0x36db1c,_0x5a54e9[_0xf009('0x14')][_0xf009('0x16')]);return _0x4c1057(_0x5a54e9[_0xf009('0x14')][_0xf009('0x16')]);}logger[_0xf009('0x14')](_0xf009('0x15'),_0x36db1c,_0x5a54e9[_0xf009('0x14')][_0xf009('0x16')]);return _0x549010(_0x5a54e9[_0xf009('0x14')]['message']);}else{logger[_0xf009('0x10')](_0xf009('0x15'),_0x36db1c,_0xf009('0x11'));_0x549010(_0x5a54e9['result'][_0xf009('0x16')]);}})['catch'](function(_0x5b2786){logger[_0xf009('0x14')](_0xf009('0x15'),_0x36db1c,_0x5b2786);_0x4c1057(_0x5b2786);});});}
\ No newline at end of file
+var _0x7c22=['./chatInternalMessage.socket','register','request','info','ChatInternalMessage,\x20%s,\x20%s','ChatInternalMessage,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','catch','lodash','util','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/environment','client','redis','defaults','localhost','socket.io-emitter'];(function(_0x631652,_0x162d98){var _0x5ca72b=function(_0x55fbc4){while(--_0x55fbc4){_0x631652['push'](_0x631652['shift']());}};_0x5ca72b(++_0x162d98);}(_0x7c22,0x6c));var _0x27c2=function(_0x5e1816,_0x46daf4){_0x5e1816=_0x5e1816-0x0;var _0x416218=_0x7c22[_0x5e1816];return _0x416218;};'use strict';var _=require(_0x27c2('0x0'));var util=require(_0x27c2('0x1'));var moment=require('moment');var BPromise=require(_0x27c2('0x2'));var rs=require(_0x27c2('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x27c2('0x4'))['db'];var utils=require(_0x27c2('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0x27c2('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x27c2('0x7')]['http']({'port':0x232a});config[_0x27c2('0x8')]=_[_0x27c2('0x9')](config['redis'],{'host':_0x27c2('0xa'),'port':0x18eb});var socket=require(_0x27c2('0xb'))(new Redis(config[_0x27c2('0x8')]));require(_0x27c2('0xc'))[_0x27c2('0xd')](socket);function respondWithRpcPromise(_0x49d911,_0x4acaa9,_0x1bb9a8){return new BPromise(function(_0x3552e6,_0x260095){return client[_0x27c2('0xe')](_0x49d911,_0x1bb9a8)['then'](function(_0x4555ed){logger[_0x27c2('0xf')](_0x27c2('0x10'),_0x4acaa9,'request\x20sent');logger['debug'](_0x27c2('0x11'),_0x4acaa9,_0x27c2('0x12'),JSON[_0x27c2('0x13')](_0x4555ed));if(_0x4555ed[_0x27c2('0x14')]){if(_0x4555ed[_0x27c2('0x14')]['code']===0x1f4){logger[_0x27c2('0x14')]('ChatInternalMessage,\x20%s,\x20%s',_0x4acaa9,_0x4555ed[_0x27c2('0x14')][_0x27c2('0x15')]);return _0x260095(_0x4555ed[_0x27c2('0x14')][_0x27c2('0x15')]);}logger['error'](_0x27c2('0x10'),_0x4acaa9,_0x4555ed[_0x27c2('0x14')][_0x27c2('0x15')]);return _0x3552e6(_0x4555ed[_0x27c2('0x14')][_0x27c2('0x15')]);}else{logger[_0x27c2('0xf')](_0x27c2('0x10'),_0x4acaa9,_0x27c2('0x12'));_0x3552e6(_0x4555ed[_0x27c2('0x16')]['message']);}})[_0x27c2('0x17')](function(_0x2bd89e){logger[_0x27c2('0x14')](_0x27c2('0x10'),_0x4acaa9,_0x2bd89e);_0x260095(_0x2bd89e);});});}
\ No newline at end of file