Built motion from commit (unavailable).|2.4.4
[motion2.git] / server / api / chatInternalMessage / chatInternalMessage.rpc.js
index ba951e2..a3f4f02 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa0c9=['redis','defaults','localhost','socket.io-emitter','./chatInternalMessage.socket','then','info','ChatInternalMessage,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/environment','jayson/promise','client','http'];(function(_0x103e36,_0x3be8f0){var _0x2a7c31=function(_0x286e90){while(--_0x286e90){_0x103e36['push'](_0x103e36['shift']());}};_0x2a7c31(++_0x3be8f0);}(_0xa0c9,0xf0));var _0x9a0c=function(_0x269a18,_0x1a2dd0){_0x269a18=_0x269a18-0x0;var _0x3d3bb7=_0xa0c9[_0x269a18];return _0x3d3bb7;};'use strict';var _=require(_0x9a0c('0x0'));var util=require(_0x9a0c('0x1'));var moment=require('moment');var BPromise=require(_0x9a0c('0x2'));var rs=require(_0x9a0c('0x3'));var fs=require('fs');var Redis=require(_0x9a0c('0x4'));var db=require(_0x9a0c('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0x9a0c('0x6'));var jayson=require(_0x9a0c('0x7'));var client=jayson[_0x9a0c('0x8')][_0x9a0c('0x9')]({'port':0x232a});config[_0x9a0c('0xa')]=_[_0x9a0c('0xb')](config[_0x9a0c('0xa')],{'host':_0x9a0c('0xc'),'port':0x18eb});var socket=require(_0x9a0c('0xd'))(new Redis(config[_0x9a0c('0xa')]));require(_0x9a0c('0xe'))['register'](socket);function respondWithRpcPromise(_0xcaee47,_0x2e9451,_0x5ba599){return new BPromise(function(_0x2201de,_0x595444){return client['request'](_0xcaee47,_0x5ba599)[_0x9a0c('0xf')](function(_0x5e7280){logger[_0x9a0c('0x10')](_0x9a0c('0x11'),_0x2e9451,_0x9a0c('0x12'));logger[_0x9a0c('0x13')]('ChatInternalMessage,\x20%s,\x20%s,\x20%s',_0x2e9451,_0x9a0c('0x12'),JSON[_0x9a0c('0x14')](_0x5e7280));if(_0x5e7280[_0x9a0c('0x15')]){if(_0x5e7280[_0x9a0c('0x15')][_0x9a0c('0x16')]===0x1f4){logger[_0x9a0c('0x15')](_0x9a0c('0x11'),_0x2e9451,_0x5e7280[_0x9a0c('0x15')][_0x9a0c('0x17')]);return _0x595444(_0x5e7280[_0x9a0c('0x15')]['message']);}logger[_0x9a0c('0x15')](_0x9a0c('0x11'),_0x2e9451,_0x5e7280[_0x9a0c('0x15')][_0x9a0c('0x17')]);return _0x2201de(_0x5e7280[_0x9a0c('0x15')][_0x9a0c('0x17')]);}else{logger['info'](_0x9a0c('0x11'),_0x2e9451,_0x9a0c('0x12'));_0x2201de(_0x5e7280[_0x9a0c('0x18')][_0x9a0c('0x17')]);}})['catch'](function(_0x1cc22f){logger[_0x9a0c('0x15')](_0x9a0c('0x11'),_0x2e9451,_0x1cc22f);_0x595444(_0x1cc22f);});});}
\ No newline at end of file
+var _0xd911=['../../config/environment','jayson/promise','client','http','defaults','redis','localhost','./chatInternalMessage.socket','register','request','then','ChatInternalMessage,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','catch','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0xb729d2,_0x131a0e){var _0x181500=function(_0x38cdec){while(--_0x38cdec){_0xb729d2['push'](_0xb729d2['shift']());}};_0x181500(++_0x131a0e);}(_0xd911,0x1df));var _0x1d91=function(_0x3108d9,_0xf08d6){_0x3108d9=_0x3108d9-0x0;var _0x1455e6=_0xd911[_0x3108d9];return _0x1455e6;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x1d91('0x0'));var BPromise=require('bluebird');var rs=require(_0x1d91('0x1'));var fs=require('fs');var Redis=require(_0x1d91('0x2'));var db=require(_0x1d91('0x3'))['db'];var utils=require(_0x1d91('0x4'));var logger=require(_0x1d91('0x5'))(_0x1d91('0x6'));var config=require(_0x1d91('0x7'));var jayson=require(_0x1d91('0x8'));var client=jayson[_0x1d91('0x9')][_0x1d91('0xa')]({'port':0x232a});config['redis']=_[_0x1d91('0xb')](config[_0x1d91('0xc')],{'host':_0x1d91('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x1d91('0xc')]));require(_0x1d91('0xe'))[_0x1d91('0xf')](socket);function respondWithRpcPromise(_0x572145,_0xdc7ea4,_0x406765){return new BPromise(function(_0x364c1e,_0x1c0bb1){return client[_0x1d91('0x10')](_0x572145,_0x406765)[_0x1d91('0x11')](function(_0x50e0b0){logger['info'](_0x1d91('0x12'),_0xdc7ea4,_0x1d91('0x13'));logger['debug']('ChatInternalMessage,\x20%s,\x20%s,\x20%s',_0xdc7ea4,_0x1d91('0x13'),JSON[_0x1d91('0x14')](_0x50e0b0));if(_0x50e0b0[_0x1d91('0x15')]){if(_0x50e0b0[_0x1d91('0x15')][_0x1d91('0x16')]===0x1f4){logger[_0x1d91('0x15')](_0x1d91('0x12'),_0xdc7ea4,_0x50e0b0['error']['message']);return _0x1c0bb1(_0x50e0b0[_0x1d91('0x15')]['message']);}logger[_0x1d91('0x15')](_0x1d91('0x12'),_0xdc7ea4,_0x50e0b0[_0x1d91('0x15')][_0x1d91('0x17')]);return _0x364c1e(_0x50e0b0[_0x1d91('0x15')][_0x1d91('0x17')]);}else{logger[_0x1d91('0x18')](_0x1d91('0x12'),_0xdc7ea4,_0x1d91('0x13'));_0x364c1e(_0x50e0b0[_0x1d91('0x19')][_0x1d91('0x17')]);}})[_0x1d91('0x1a')](function(_0x4cbb39){logger[_0x1d91('0x15')]('ChatInternalMessage,\x20%s,\x20%s',_0xdc7ea4,_0x4cbb39);_0x1c0bb1(_0x4cbb39);});});}
\ No newline at end of file