Built motion from commit 19a84241.|2.5.34
[motion2.git] / server / api / chatInternalMessage / chatInternalMessage.rpc.js
index f37a6b2..9b000b2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9c86=['stringify','error','message','result','lodash','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','client','http','redis','defaults','localhost','socket.io-emitter','register','request','then','info','ChatInternalMessage,\x20%s,\x20%s','request\x20sent','debug','ChatInternalMessage,\x20%s,\x20%s,\x20%s'];(function(_0x3b543d,_0x3568df){var _0x4266cf=function(_0x4614be){while(--_0x4614be){_0x3b543d['push'](_0x3b543d['shift']());}};_0x4266cf(++_0x3568df);}(_0x9c86,0x68));var _0x69c8=function(_0x397e5f,_0x454c8f){_0x397e5f=_0x397e5f-0x0;var _0x5302b8=_0x9c86[_0x397e5f];return _0x5302b8;};'use strict';var _=require(_0x69c8('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x69c8('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x69c8('0x2'));var db=require(_0x69c8('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x69c8('0x4'))(_0x69c8('0x5'));var config=require(_0x69c8('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x69c8('0x7')][_0x69c8('0x8')]({'port':0x232a});config[_0x69c8('0x9')]=_[_0x69c8('0xa')](config[_0x69c8('0x9')],{'host':_0x69c8('0xb'),'port':0x18eb});var socket=require(_0x69c8('0xc'))(new Redis(config['redis']));require('./chatInternalMessage.socket')[_0x69c8('0xd')](socket);function respondWithRpcPromise(_0x586f99,_0x476f9e,_0x34aeae){return new BPromise(function(_0xbdadb1,_0xb9e4ec){return client[_0x69c8('0xe')](_0x586f99,_0x34aeae)[_0x69c8('0xf')](function(_0x422d8a){logger[_0x69c8('0x10')](_0x69c8('0x11'),_0x476f9e,_0x69c8('0x12'));logger[_0x69c8('0x13')](_0x69c8('0x14'),_0x476f9e,'request\x20sent',JSON[_0x69c8('0x15')](_0x422d8a));if(_0x422d8a[_0x69c8('0x16')]){if(_0x422d8a[_0x69c8('0x16')]['code']===0x1f4){logger[_0x69c8('0x16')](_0x69c8('0x11'),_0x476f9e,_0x422d8a['error']['message']);return _0xb9e4ec(_0x422d8a[_0x69c8('0x16')][_0x69c8('0x17')]);}logger[_0x69c8('0x16')](_0x69c8('0x11'),_0x476f9e,_0x422d8a[_0x69c8('0x16')][_0x69c8('0x17')]);return _0xbdadb1(_0x422d8a[_0x69c8('0x16')][_0x69c8('0x17')]);}else{logger[_0x69c8('0x10')]('ChatInternalMessage,\x20%s,\x20%s',_0x476f9e,'request\x20sent');_0xbdadb1(_0x422d8a[_0x69c8('0x18')][_0x69c8('0x17')]);}})['catch'](function(_0x498fe6){logger[_0x69c8('0x16')](_0x69c8('0x11'),_0x476f9e,_0x498fe6);_0xb9e4ec(_0x498fe6);});});}
\ No newline at end of file
+var _0x1016=['../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','localhost','socket.io-emitter','./chatInternalMessage.socket','then','info','ChatInternalMessage,\x20%s,\x20%s','request\x20sent','debug','ChatInternalMessage,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','lodash','util','moment','randomstring','ioredis'];(function(_0x2c91e9,_0x2fb965){var _0x13f0ff=function(_0xb39edf){while(--_0xb39edf){_0x2c91e9['push'](_0x2c91e9['shift']());}};_0x13f0ff(++_0x2fb965);}(_0x1016,0x124));var _0x6101=function(_0x25f8e8,_0x519d8e){_0x25f8e8=_0x25f8e8-0x0;var _0x1df02c=_0x1016[_0x25f8e8];return _0x1df02c;};'use strict';var _=require(_0x6101('0x0'));var util=require(_0x6101('0x1'));var moment=require(_0x6101('0x2'));var BPromise=require('bluebird');var rs=require(_0x6101('0x3'));var fs=require('fs');var Redis=require(_0x6101('0x4'));var db=require(_0x6101('0x5'))['db'];var utils=require(_0x6101('0x6'));var logger=require(_0x6101('0x7'))(_0x6101('0x8'));var config=require(_0x6101('0x9'));var jayson=require(_0x6101('0xa'));var client=jayson['client'][_0x6101('0xb')]({'port':0x232a});config[_0x6101('0xc')]=_['defaults'](config[_0x6101('0xc')],{'host':_0x6101('0xd'),'port':0x18eb});var socket=require(_0x6101('0xe'))(new Redis(config[_0x6101('0xc')]));require(_0x6101('0xf'))['register'](socket);function respondWithRpcPromise(_0x44ceb1,_0x2de66e,_0x329bac){return new BPromise(function(_0x38dc8d,_0x122cb8){return client['request'](_0x44ceb1,_0x329bac)[_0x6101('0x10')](function(_0x37acb1){logger[_0x6101('0x11')](_0x6101('0x12'),_0x2de66e,_0x6101('0x13'));logger[_0x6101('0x14')](_0x6101('0x15'),_0x2de66e,_0x6101('0x13'),JSON['stringify'](_0x37acb1));if(_0x37acb1[_0x6101('0x16')]){if(_0x37acb1[_0x6101('0x16')][_0x6101('0x17')]===0x1f4){logger[_0x6101('0x16')](_0x6101('0x12'),_0x2de66e,_0x37acb1[_0x6101('0x16')]['message']);return _0x122cb8(_0x37acb1[_0x6101('0x16')][_0x6101('0x18')]);}logger['error']('ChatInternalMessage,\x20%s,\x20%s',_0x2de66e,_0x37acb1['error']['message']);return _0x38dc8d(_0x37acb1[_0x6101('0x16')][_0x6101('0x18')]);}else{logger['info'](_0x6101('0x12'),_0x2de66e,_0x6101('0x13'));_0x38dc8d(_0x37acb1[_0x6101('0x19')]['message']);}})[_0x6101('0x1a')](function(_0x1c87d3){logger['error'](_0x6101('0x12'),_0x2de66e,_0x1c87d3);_0x122cb8(_0x1c87d3);});});}
\ No newline at end of file