Built motion from commit 5b761a7b.|2.5.36
[motion2.git] / server / api / chatApplication / chatApplication.rpc.js
index 3304b9b..b566991 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x617a=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','info','debug','request\x20sent','stringify','error','code','ChatApplication,\x20%s,\x20%s','message','result','catch','util','moment','bluebird'];(function(_0x330253,_0x4ade03){var _0xa6148=function(_0x2e1a4c){while(--_0x2e1a4c){_0x330253['push'](_0x330253['shift']());}};_0xa6148(++_0x4ade03);}(_0x617a,0xcc));var _0xa617=function(_0x55ba90,_0x3ab4bc){_0x55ba90=_0x55ba90-0x0;var _0x536129=_0x617a[_0x55ba90];return _0x536129;};'use strict';var _=require('lodash');var util=require(_0xa617('0x0'));var moment=require(_0xa617('0x1'));var BPromise=require(_0xa617('0x2'));var rs=require(_0xa617('0x3'));var fs=require('fs');var Redis=require(_0xa617('0x4'));var db=require(_0xa617('0x5'))['db'];var utils=require(_0xa617('0x6'));var logger=require(_0xa617('0x7'))(_0xa617('0x8'));var config=require(_0xa617('0x9'));var jayson=require(_0xa617('0xa'));var client=jayson[_0xa617('0xb')][_0xa617('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x3abde6,_0x560b83,_0x5070ea){return new BPromise(function(_0x583311,_0x4c9c7f){return client['request'](_0x3abde6,_0x5070ea)['then'](function(_0x495744){logger[_0xa617('0xd')]('ChatApplication,\x20%s,\x20%s',_0x560b83,'request\x20sent');logger[_0xa617('0xe')]('ChatApplication,\x20%s,\x20%s,\x20%s',_0x560b83,_0xa617('0xf'),JSON[_0xa617('0x10')](_0x495744));if(_0x495744[_0xa617('0x11')]){if(_0x495744[_0xa617('0x11')][_0xa617('0x12')]===0x1f4){logger[_0xa617('0x11')](_0xa617('0x13'),_0x560b83,_0x495744[_0xa617('0x11')][_0xa617('0x14')]);return _0x4c9c7f(_0x495744['error'][_0xa617('0x14')]);}logger[_0xa617('0x11')](_0xa617('0x13'),_0x560b83,_0x495744[_0xa617('0x11')]['message']);return _0x583311(_0x495744[_0xa617('0x11')][_0xa617('0x14')]);}else{logger[_0xa617('0xd')](_0xa617('0x13'),_0x560b83,'request\x20sent');_0x583311(_0x495744[_0xa617('0x15')][_0xa617('0x14')]);}})[_0xa617('0x16')](function(_0x265134){logger[_0xa617('0x11')](_0xa617('0x13'),_0x560b83,_0x265134);_0x4c9c7f(_0x265134);});});}
\ No newline at end of file
+var _0x52e1=['error','code','message','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','http','then','info','ChatApplication,\x20%s,\x20%s','request\x20sent','ChatApplication,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x1c7b33,_0x381cc5){var _0x154be0=function(_0x3e7baf){while(--_0x3e7baf){_0x1c7b33['push'](_0x1c7b33['shift']());}};_0x154be0(++_0x381cc5);}(_0x52e1,0x191));var _0x152e=function(_0xa69733,_0x2aa122){_0xa69733=_0xa69733-0x0;var _0xca5645=_0x52e1[_0xa69733];return _0xca5645;};'use strict';var _=require(_0x152e('0x0'));var util=require(_0x152e('0x1'));var moment=require(_0x152e('0x2'));var BPromise=require('bluebird');var rs=require(_0x152e('0x3'));var fs=require('fs');var Redis=require(_0x152e('0x4'));var db=require(_0x152e('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x152e('0x6'))('rpc');var config=require(_0x152e('0x7'));var jayson=require(_0x152e('0x8'));var client=jayson[_0x152e('0x9')][_0x152e('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2377bf,_0x2f527f,_0x351c95){return new BPromise(function(_0x5671a9,_0x51440e){return client['request'](_0x2377bf,_0x351c95)[_0x152e('0xb')](function(_0x5cb5e1){logger[_0x152e('0xc')](_0x152e('0xd'),_0x2f527f,_0x152e('0xe'));logger['debug'](_0x152e('0xf'),_0x2f527f,'request\x20sent',JSON[_0x152e('0x10')](_0x5cb5e1));if(_0x5cb5e1['error']){if(_0x5cb5e1[_0x152e('0x11')][_0x152e('0x12')]===0x1f4){logger[_0x152e('0x11')]('ChatApplication,\x20%s,\x20%s',_0x2f527f,_0x5cb5e1[_0x152e('0x11')][_0x152e('0x13')]);return _0x51440e(_0x5cb5e1[_0x152e('0x11')]['message']);}logger[_0x152e('0x11')](_0x152e('0xd'),_0x2f527f,_0x5cb5e1[_0x152e('0x11')][_0x152e('0x13')]);return _0x5671a9(_0x5cb5e1[_0x152e('0x11')][_0x152e('0x13')]);}else{logger[_0x152e('0xc')](_0x152e('0xd'),_0x2f527f,_0x152e('0xe'));_0x5671a9(_0x5cb5e1[_0x152e('0x14')][_0x152e('0x13')]);}})[_0x152e('0x15')](function(_0xd5151f){logger['error'](_0x152e('0xd'),_0x2f527f,_0xd5151f);_0x51440e(_0xd5151f);});});}
\ No newline at end of file