Built motion from commit d1eab355.|2.6.28
[motion2.git] / server / api / chatApplication / chatApplication.rpc.js
index 8016461..8969a71 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6ab3=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','then','info','request\x20sent','debug','ChatApplication,\x20%s,\x20%s,\x20%s','error','code','ChatApplication,\x20%s,\x20%s','message','result','util','moment'];(function(_0x1391a8,_0x4e2f7f){var _0x1e3519=function(_0x1ad406){while(--_0x1ad406){_0x1391a8['push'](_0x1391a8['shift']());}};_0x1e3519(++_0x4e2f7f);}(_0x6ab3,0x70));var _0x36ab=function(_0x1e399a,_0x351c59){_0x1e399a=_0x1e399a-0x0;var _0x539897=_0x6ab3[_0x1e399a];return _0x539897;};'use strict';var _=require('lodash');var util=require(_0x36ab('0x0'));var moment=require(_0x36ab('0x1'));var BPromise=require('bluebird');var rs=require(_0x36ab('0x2'));var fs=require('fs');var Redis=require(_0x36ab('0x3'));var db=require(_0x36ab('0x4'))['db'];var utils=require(_0x36ab('0x5'));var logger=require(_0x36ab('0x6'))(_0x36ab('0x7'));var config=require('../../config/environment');var jayson=require(_0x36ab('0x8'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0xc2d3bd,_0x80f142,_0x5b0a62){return new BPromise(function(_0x16beaf,_0xb23638){return client['request'](_0xc2d3bd,_0x5b0a62)[_0x36ab('0x9')](function(_0x566d20){logger[_0x36ab('0xa')]('ChatApplication,\x20%s,\x20%s',_0x80f142,_0x36ab('0xb'));logger[_0x36ab('0xc')](_0x36ab('0xd'),_0x80f142,_0x36ab('0xb'),JSON['stringify'](_0x566d20));if(_0x566d20['error']){if(_0x566d20[_0x36ab('0xe')][_0x36ab('0xf')]===0x1f4){logger['error'](_0x36ab('0x10'),_0x80f142,_0x566d20[_0x36ab('0xe')][_0x36ab('0x11')]);return _0xb23638(_0x566d20[_0x36ab('0xe')][_0x36ab('0x11')]);}logger[_0x36ab('0xe')]('ChatApplication,\x20%s,\x20%s',_0x80f142,_0x566d20[_0x36ab('0xe')][_0x36ab('0x11')]);return _0x16beaf(_0x566d20['error']['message']);}else{logger[_0x36ab('0xa')](_0x36ab('0x10'),_0x80f142,_0x36ab('0xb'));_0x16beaf(_0x566d20[_0x36ab('0x12')][_0x36ab('0x11')]);}})['catch'](function(_0x2a49de){logger[_0x36ab('0xe')]('ChatApplication,\x20%s,\x20%s',_0x80f142,_0x2a49de);_0xb23638(_0x2a49de);});});}
\ No newline at end of file
+var _0x56a4=['client','info','request\x20sent','ChatApplication,\x20%s,\x20%s,\x20%s','stringify','error','code','message','ChatApplication,\x20%s,\x20%s','catch','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment'];(function(_0x246863,_0x49cbfe){var _0x226131=function(_0x472204){while(--_0x472204){_0x246863['push'](_0x246863['shift']());}};_0x226131(++_0x49cbfe);}(_0x56a4,0x9a));var _0x456a=function(_0x496d3c,_0x3eab1e){_0x496d3c=_0x496d3c-0x0;var _0x3700b8=_0x56a4[_0x496d3c];return _0x3700b8;};'use strict';var _=require(_0x456a('0x0'));var util=require('util');var moment=require(_0x456a('0x1'));var BPromise=require(_0x456a('0x2'));var rs=require(_0x456a('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x456a('0x4'))['db'];var utils=require(_0x456a('0x5'));var logger=require('../../config/logger')(_0x456a('0x6'));var config=require(_0x456a('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x456a('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x245ba2,_0x5700ac,_0x57dd98){return new BPromise(function(_0x36fa4d,_0x11d496){return client['request'](_0x245ba2,_0x57dd98)['then'](function(_0x4fa0e4){logger[_0x456a('0x9')]('ChatApplication,\x20%s,\x20%s',_0x5700ac,_0x456a('0xa'));logger['debug'](_0x456a('0xb'),_0x5700ac,_0x456a('0xa'),JSON[_0x456a('0xc')](_0x4fa0e4));if(_0x4fa0e4[_0x456a('0xd')]){if(_0x4fa0e4[_0x456a('0xd')][_0x456a('0xe')]===0x1f4){logger[_0x456a('0xd')]('ChatApplication,\x20%s,\x20%s',_0x5700ac,_0x4fa0e4['error'][_0x456a('0xf')]);return _0x11d496(_0x4fa0e4['error'][_0x456a('0xf')]);}logger[_0x456a('0xd')](_0x456a('0x10'),_0x5700ac,_0x4fa0e4[_0x456a('0xd')][_0x456a('0xf')]);return _0x36fa4d(_0x4fa0e4['error']['message']);}else{logger[_0x456a('0x9')](_0x456a('0x10'),_0x5700ac,_0x456a('0xa'));_0x36fa4d(_0x4fa0e4['result'][_0x456a('0xf')]);}})[_0x456a('0x11')](function(_0x2a8066){logger['error']('ChatApplication,\x20%s,\x20%s',_0x5700ac,_0x2a8066);_0x11d496(_0x2a8066);});});}
\ No newline at end of file