Built motion from commit da617fac.|2.6.6
[motion2.git] / server / api / chatApplication / chatApplication.rpc.js
index 0980aef..317a898 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfcfb=['../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug','ChatApplication,\x20%s,\x20%s,\x20%s','stringify','error','code','ChatApplication,\x20%s,\x20%s','message','result','lodash','moment','bluebird','randomstring'];(function(_0x5647c8,_0x590008){var _0x1e464f=function(_0x2224a4){while(--_0x2224a4){_0x5647c8['push'](_0x5647c8['shift']());}};_0x1e464f(++_0x590008);}(_0xfcfb,0x9d));var _0xbfcf=function(_0x4ce15c,_0x1bbcbd){_0x4ce15c=_0x4ce15c-0x0;var _0x5ee259=_0xfcfb[_0x4ce15c];return _0x5ee259;};'use strict';var _=require(_0xbfcf('0x0'));var util=require('util');var moment=require(_0xbfcf('0x1'));var BPromise=require(_0xbfcf('0x2'));var rs=require(_0xbfcf('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xbfcf('0x4'))['db'];var utils=require(_0xbfcf('0x5'));var logger=require(_0xbfcf('0x6'))('rpc');var config=require(_0xbfcf('0x7'));var jayson=require(_0xbfcf('0x8'));var client=jayson[_0xbfcf('0x9')][_0xbfcf('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x39011a,_0x531aa6,_0x4681c2){return new BPromise(function(_0x18bd30,_0x5da9fa){return client[_0xbfcf('0xb')](_0x39011a,_0x4681c2)[_0xbfcf('0xc')](function(_0x1ca392){logger[_0xbfcf('0xd')]('ChatApplication,\x20%s,\x20%s',_0x531aa6,_0xbfcf('0xe'));logger[_0xbfcf('0xf')](_0xbfcf('0x10'),_0x531aa6,_0xbfcf('0xe'),JSON[_0xbfcf('0x11')](_0x1ca392));if(_0x1ca392[_0xbfcf('0x12')]){if(_0x1ca392[_0xbfcf('0x12')][_0xbfcf('0x13')]===0x1f4){logger[_0xbfcf('0x12')](_0xbfcf('0x14'),_0x531aa6,_0x1ca392[_0xbfcf('0x12')][_0xbfcf('0x15')]);return _0x5da9fa(_0x1ca392[_0xbfcf('0x12')][_0xbfcf('0x15')]);}logger[_0xbfcf('0x12')]('ChatApplication,\x20%s,\x20%s',_0x531aa6,_0x1ca392[_0xbfcf('0x12')][_0xbfcf('0x15')]);return _0x18bd30(_0x1ca392[_0xbfcf('0x12')][_0xbfcf('0x15')]);}else{logger[_0xbfcf('0xd')](_0xbfcf('0x14'),_0x531aa6,_0xbfcf('0xe'));_0x18bd30(_0x1ca392[_0xbfcf('0x16')][_0xbfcf('0x15')]);}})['catch'](function(_0x2a6a4e){logger[_0xbfcf('0x12')](_0xbfcf('0x14'),_0x531aa6,_0x2a6a4e);_0x5da9fa(_0x2a6a4e);});});}
\ No newline at end of file
+var _0x1638=['../../config/utils','../../config/logger','rpc','jayson/promise','client','then','request\x20sent','debug','ChatApplication,\x20%s,\x20%s,\x20%s','stringify','error','code','ChatApplication,\x20%s,\x20%s','message','result','lodash','util','randomstring','ioredis','../../mysqldb'];(function(_0x3568d3,_0x5dd241){var _0x3e2065=function(_0x599771){while(--_0x599771){_0x3568d3['push'](_0x3568d3['shift']());}};_0x3e2065(++_0x5dd241);}(_0x1638,0x9b));var _0x8163=function(_0x487131,_0x2c86e8){_0x487131=_0x487131-0x0;var _0xf320ff=_0x1638[_0x487131];return _0xf320ff;};'use strict';var _=require(_0x8163('0x0'));var util=require(_0x8163('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x8163('0x2'));var fs=require('fs');var Redis=require(_0x8163('0x3'));var db=require(_0x8163('0x4'))['db'];var utils=require(_0x8163('0x5'));var logger=require(_0x8163('0x6'))(_0x8163('0x7'));var config=require('../../config/environment');var jayson=require(_0x8163('0x8'));var client=jayson[_0x8163('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x510c87,_0x2701ec,_0x446dc5){return new BPromise(function(_0xe22fbe,_0x430b71){return client['request'](_0x510c87,_0x446dc5)[_0x8163('0xa')](function(_0x1e049e){logger['info']('ChatApplication,\x20%s,\x20%s',_0x2701ec,_0x8163('0xb'));logger[_0x8163('0xc')](_0x8163('0xd'),_0x2701ec,'request\x20sent',JSON[_0x8163('0xe')](_0x1e049e));if(_0x1e049e[_0x8163('0xf')]){if(_0x1e049e[_0x8163('0xf')][_0x8163('0x10')]===0x1f4){logger[_0x8163('0xf')](_0x8163('0x11'),_0x2701ec,_0x1e049e[_0x8163('0xf')]['message']);return _0x430b71(_0x1e049e[_0x8163('0xf')][_0x8163('0x12')]);}logger['error'](_0x8163('0x11'),_0x2701ec,_0x1e049e['error']['message']);return _0xe22fbe(_0x1e049e[_0x8163('0xf')][_0x8163('0x12')]);}else{logger['info'](_0x8163('0x11'),_0x2701ec,_0x8163('0xb'));_0xe22fbe(_0x1e049e[_0x8163('0x13')]['message']);}})['catch'](function(_0xb66455){logger[_0x8163('0xf')]('ChatApplication,\x20%s,\x20%s',_0x2701ec,_0xb66455);_0x430b71(_0xb66455);});});}
\ No newline at end of file