Built motion from commit da617fac.|2.6.6
[motion2.git] / server / api / chatInternalMessage / chatInternalMessage.rpc.js
index cdf4e09..28cc775 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0b84=['rpc','redis','defaults','socket.io-emitter','request','then','info','debug','ChatInternalMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','ChatInternalMessage,\x20%s,\x20%s','message','request\x20sent','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x22f9c0,_0x35410c){var _0x1883fe=function(_0x5a5601){while(--_0x5a5601){_0x22f9c0['push'](_0x22f9c0['shift']());}};_0x1883fe(++_0x35410c);}(_0x0b84,0x1cb));var _0x40b8=function(_0x450bf9,_0x1895de){_0x450bf9=_0x450bf9-0x0;var _0x268350=_0x0b84[_0x450bf9];return _0x268350;};'use strict';var _=require(_0x40b8('0x0'));var util=require(_0x40b8('0x1'));var moment=require(_0x40b8('0x2'));var BPromise=require(_0x40b8('0x3'));var rs=require(_0x40b8('0x4'));var fs=require('fs');var Redis=require(_0x40b8('0x5'));var db=require(_0x40b8('0x6'))['db'];var utils=require(_0x40b8('0x7'));var logger=require(_0x40b8('0x8'))(_0x40b8('0x9'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});config[_0x40b8('0xa')]=_[_0x40b8('0xb')](config[_0x40b8('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0x40b8('0xc'))(new Redis(config[_0x40b8('0xa')]));require('./chatInternalMessage.socket')['register'](socket);function respondWithRpcPromise(_0x311bdd,_0x121b29,_0x258ef1){return new BPromise(function(_0x426467,_0x21a8bc){return client[_0x40b8('0xd')](_0x311bdd,_0x258ef1)[_0x40b8('0xe')](function(_0x1d2743){logger[_0x40b8('0xf')]('ChatInternalMessage,\x20%s,\x20%s',_0x121b29,'request\x20sent');logger[_0x40b8('0x10')](_0x40b8('0x11'),_0x121b29,'request\x20sent',JSON[_0x40b8('0x12')](_0x1d2743));if(_0x1d2743['error']){if(_0x1d2743[_0x40b8('0x13')][_0x40b8('0x14')]===0x1f4){logger[_0x40b8('0x13')](_0x40b8('0x15'),_0x121b29,_0x1d2743[_0x40b8('0x13')]['message']);return _0x21a8bc(_0x1d2743[_0x40b8('0x13')]['message']);}logger[_0x40b8('0x13')]('ChatInternalMessage,\x20%s,\x20%s',_0x121b29,_0x1d2743[_0x40b8('0x13')][_0x40b8('0x16')]);return _0x426467(_0x1d2743[_0x40b8('0x13')][_0x40b8('0x16')]);}else{logger['info'](_0x40b8('0x15'),_0x121b29,_0x40b8('0x17'));_0x426467(_0x1d2743[_0x40b8('0x18')][_0x40b8('0x16')]);}})[_0x40b8('0x19')](function(_0x16fa13){logger['error'](_0x40b8('0x15'),_0x121b29,_0x16fa13);_0x21a8bc(_0x16fa13);});});}
\ No newline at end of file
+var _0xafc6=['http','redis','defaults','localhost','socket.io-emitter','register','then','info','ChatInternalMessage,\x20%s,\x20%s','request\x20sent','debug','ChatInternalMessage,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client'];(function(_0x1e6737,_0x3a00b9){var _0x13209b=function(_0x161523){while(--_0x161523){_0x1e6737['push'](_0x1e6737['shift']());}};_0x13209b(++_0x3a00b9);}(_0xafc6,0xf9));var _0x6afc=function(_0x3fba9f,_0x3b7b9b){_0x3fba9f=_0x3fba9f-0x0;var _0x192cf1=_0xafc6[_0x3fba9f];return _0x192cf1;};'use strict';var _=require(_0x6afc('0x0'));var util=require(_0x6afc('0x1'));var moment=require(_0x6afc('0x2'));var BPromise=require(_0x6afc('0x3'));var rs=require(_0x6afc('0x4'));var fs=require('fs');var Redis=require(_0x6afc('0x5'));var db=require(_0x6afc('0x6'))['db'];var utils=require(_0x6afc('0x7'));var logger=require('../../config/logger')(_0x6afc('0x8'));var config=require(_0x6afc('0x9'));var jayson=require(_0x6afc('0xa'));var client=jayson[_0x6afc('0xb')][_0x6afc('0xc')]({'port':0x232a});config[_0x6afc('0xd')]=_[_0x6afc('0xe')](config[_0x6afc('0xd')],{'host':_0x6afc('0xf'),'port':0x18eb});var socket=require(_0x6afc('0x10'))(new Redis(config[_0x6afc('0xd')]));require('./chatInternalMessage.socket')[_0x6afc('0x11')](socket);function respondWithRpcPromise(_0x252760,_0x5b68d6,_0x4dc0ab){return new BPromise(function(_0x51454f,_0x3d687e){return client['request'](_0x252760,_0x4dc0ab)[_0x6afc('0x12')](function(_0x39348d){logger[_0x6afc('0x13')](_0x6afc('0x14'),_0x5b68d6,_0x6afc('0x15'));logger[_0x6afc('0x16')](_0x6afc('0x17'),_0x5b68d6,_0x6afc('0x15'),JSON[_0x6afc('0x18')](_0x39348d));if(_0x39348d[_0x6afc('0x19')]){if(_0x39348d[_0x6afc('0x19')]['code']===0x1f4){logger[_0x6afc('0x19')](_0x6afc('0x14'),_0x5b68d6,_0x39348d[_0x6afc('0x19')][_0x6afc('0x1a')]);return _0x3d687e(_0x39348d[_0x6afc('0x19')][_0x6afc('0x1a')]);}logger[_0x6afc('0x19')]('ChatInternalMessage,\x20%s,\x20%s',_0x5b68d6,_0x39348d[_0x6afc('0x19')][_0x6afc('0x1a')]);return _0x51454f(_0x39348d['error']['message']);}else{logger[_0x6afc('0x13')]('ChatInternalMessage,\x20%s,\x20%s',_0x5b68d6,'request\x20sent');_0x51454f(_0x39348d[_0x6afc('0x1b')][_0x6afc('0x1a')]);}})[_0x6afc('0x1c')](function(_0x1ed261){logger[_0x6afc('0x19')](_0x6afc('0x14'),_0x5b68d6,_0x1ed261);_0x3d687e(_0x1ed261);});});}
\ No newline at end of file