Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / server / api / chatInternalMessage / chatInternalMessage.rpc.js
index 13eeb47..f179000 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe313=['defaults','localhost','./chatInternalMessage.socket','request','then','info','ChatInternalMessage,\x20%s,\x20%s','debug','ChatInternalMessage,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','redis'];(function(_0x2972ad,_0x200e62){var _0x2021cb=function(_0x2ef2c5){while(--_0x2ef2c5){_0x2972ad['push'](_0x2972ad['shift']());}};_0x2021cb(++_0x200e62);}(_0xe313,0xe5));var _0x3e31=function(_0x3ef68e,_0xc40085){_0x3ef68e=_0x3ef68e-0x0;var _0x3485c7=_0xe313[_0x3ef68e];return _0x3485c7;};'use strict';var _=require(_0x3e31('0x0'));var util=require(_0x3e31('0x1'));var moment=require(_0x3e31('0x2'));var BPromise=require(_0x3e31('0x3'));var rs=require(_0x3e31('0x4'));var fs=require('fs');var Redis=require(_0x3e31('0x5'));var db=require(_0x3e31('0x6'))['db'];var utils=require(_0x3e31('0x7'));var logger=require(_0x3e31('0x8'))(_0x3e31('0x9'));var config=require('../../config/environment');var jayson=require(_0x3e31('0xa'));var client=jayson[_0x3e31('0xb')][_0x3e31('0xc')]({'port':0x232a});config[_0x3e31('0xd')]=_[_0x3e31('0xe')](config['redis'],{'host':_0x3e31('0xf'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x3e31('0xd')]));require(_0x3e31('0x10'))['register'](socket);function respondWithRpcPromise(_0x2e1afb,_0x4dd40b,_0x37c045){return new BPromise(function(_0x1bf3ab,_0x2cba0f){return client[_0x3e31('0x11')](_0x2e1afb,_0x37c045)[_0x3e31('0x12')](function(_0x26bf2d){logger[_0x3e31('0x13')](_0x3e31('0x14'),_0x4dd40b,'request\x20sent');logger[_0x3e31('0x15')](_0x3e31('0x16'),_0x4dd40b,_0x3e31('0x17'),JSON[_0x3e31('0x18')](_0x26bf2d));if(_0x26bf2d[_0x3e31('0x19')]){if(_0x26bf2d['error']['code']===0x1f4){logger['error'](_0x3e31('0x14'),_0x4dd40b,_0x26bf2d[_0x3e31('0x19')][_0x3e31('0x1a')]);return _0x2cba0f(_0x26bf2d[_0x3e31('0x19')][_0x3e31('0x1a')]);}logger[_0x3e31('0x19')]('ChatInternalMessage,\x20%s,\x20%s',_0x4dd40b,_0x26bf2d[_0x3e31('0x19')][_0x3e31('0x1a')]);return _0x1bf3ab(_0x26bf2d['error'][_0x3e31('0x1a')]);}else{logger['info']('ChatInternalMessage,\x20%s,\x20%s',_0x4dd40b,_0x3e31('0x17'));_0x1bf3ab(_0x26bf2d['result']['message']);}})['catch'](function(_0x247346){logger[_0x3e31('0x19')](_0x3e31('0x14'),_0x4dd40b,_0x247346);_0x2cba0f(_0x247346);});});}
\ No newline at end of file
+var _0x0665=['socket.io-emitter','register','request','ChatInternalMessage,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','info','result','catch','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','redis','defaults','localhost'];(function(_0x49d9db,_0x41347b){var _0x5f049d=function(_0x2fb1ac){while(--_0x2fb1ac){_0x49d9db['push'](_0x49d9db['shift']());}};_0x5f049d(++_0x41347b);}(_0x0665,0x1e7));var _0x5066=function(_0x5ed65f,_0x23d121){_0x5ed65f=_0x5ed65f-0x0;var _0x1f43ae=_0x0665[_0x5ed65f];return _0x1f43ae;};'use strict';var _=require(_0x5066('0x0'));var util=require(_0x5066('0x1'));var moment=require(_0x5066('0x2'));var BPromise=require('bluebird');var rs=require(_0x5066('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x5066('0x4'))['db'];var utils=require(_0x5066('0x5'));var logger=require(_0x5066('0x6'))('rpc');var config=require(_0x5066('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x5066('0x8')][_0x5066('0x9')]({'port':0x232a});config[_0x5066('0xa')]=_[_0x5066('0xb')](config[_0x5066('0xa')],{'host':_0x5066('0xc'),'port':0x18eb});var socket=require(_0x5066('0xd'))(new Redis(config[_0x5066('0xa')]));require('./chatInternalMessage.socket')[_0x5066('0xe')](socket);function respondWithRpcPromise(_0x290a0f,_0x445e25,_0x373808){return new BPromise(function(_0x39ec9e,_0x1bc504){return client[_0x5066('0xf')](_0x290a0f,_0x373808)['then'](function(_0x3a07ae){logger['info'](_0x5066('0x10'),_0x445e25,_0x5066('0x11'));logger[_0x5066('0x12')]('ChatInternalMessage,\x20%s,\x20%s,\x20%s',_0x445e25,'request\x20sent',JSON[_0x5066('0x13')](_0x3a07ae));if(_0x3a07ae[_0x5066('0x14')]){if(_0x3a07ae['error']['code']===0x1f4){logger[_0x5066('0x14')]('ChatInternalMessage,\x20%s,\x20%s',_0x445e25,_0x3a07ae['error'][_0x5066('0x15')]);return _0x1bc504(_0x3a07ae[_0x5066('0x14')]['message']);}logger[_0x5066('0x14')]('ChatInternalMessage,\x20%s,\x20%s',_0x445e25,_0x3a07ae[_0x5066('0x14')][_0x5066('0x15')]);return _0x39ec9e(_0x3a07ae[_0x5066('0x14')][_0x5066('0x15')]);}else{logger[_0x5066('0x16')](_0x5066('0x10'),_0x445e25,'request\x20sent');_0x39ec9e(_0x3a07ae[_0x5066('0x17')]['message']);}})[_0x5066('0x18')](function(_0xb47496){logger[_0x5066('0x14')](_0x5066('0x10'),_0x445e25,_0xb47496);_0x1bc504(_0xb47496);});});}
\ No newline at end of file