Built motion from commit 58b0471d.|2.6.29
[motion2.git] / server / api / chatApplication / chatApplication.rpc.js
index 25a79e2..8100c73 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbd9d=['result','catch','lodash','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','request','then','ChatApplication,\x20%s,\x20%s','request\x20sent','debug','ChatApplication,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info'];(function(_0x5e1297,_0x4a2705){var _0x7f80d=function(_0x4dedf5){while(--_0x4dedf5){_0x5e1297['push'](_0x5e1297['shift']());}};_0x7f80d(++_0x4a2705);}(_0xbd9d,0x1a0));var _0xdbd9=function(_0xa349c2,_0x1c3d39){_0xa349c2=_0xa349c2-0x0;var _0x3d4eff=_0xbd9d[_0xa349c2];return _0x3d4eff;};'use strict';var _=require(_0xdbd9('0x0'));var util=require(_0xdbd9('0x1'));var moment=require('moment');var BPromise=require(_0xdbd9('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xdbd9('0x3'));var db=require(_0xdbd9('0x4'))['db'];var utils=require(_0xdbd9('0x5'));var logger=require(_0xdbd9('0x6'))('rpc');var config=require(_0xdbd9('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xdbd9('0x8')][_0xdbd9('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x9a376,_0x4f102b,_0x4a31e6){return new BPromise(function(_0x4599d8,_0x3b2927){return client[_0xdbd9('0xa')](_0x9a376,_0x4a31e6)[_0xdbd9('0xb')](function(_0x2b73db){logger['info'](_0xdbd9('0xc'),_0x4f102b,_0xdbd9('0xd'));logger[_0xdbd9('0xe')](_0xdbd9('0xf'),_0x4f102b,'request\x20sent',JSON[_0xdbd9('0x10')](_0x2b73db));if(_0x2b73db['error']){if(_0x2b73db[_0xdbd9('0x11')][_0xdbd9('0x12')]===0x1f4){logger[_0xdbd9('0x11')]('ChatApplication,\x20%s,\x20%s',_0x4f102b,_0x2b73db['error']['message']);return _0x3b2927(_0x2b73db[_0xdbd9('0x11')]['message']);}logger[_0xdbd9('0x11')](_0xdbd9('0xc'),_0x4f102b,_0x2b73db['error'][_0xdbd9('0x13')]);return _0x4599d8(_0x2b73db['error'][_0xdbd9('0x13')]);}else{logger[_0xdbd9('0x14')]('ChatApplication,\x20%s,\x20%s',_0x4f102b,_0xdbd9('0xd'));_0x4599d8(_0x2b73db[_0xdbd9('0x15')][_0xdbd9('0x13')]);}})[_0xdbd9('0x16')](function(_0x3df631){logger[_0xdbd9('0x11')]('ChatApplication,\x20%s,\x20%s',_0x4f102b,_0x3df631);_0x3b2927(_0x3df631);});});}
\ No newline at end of file
+var _0x9f22=['jayson/promise','client','http','request','then','ChatApplication,\x20%s,\x20%s','request\x20sent','ChatApplication,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x3918a3,_0x3e3db8){var _0x4f252f=function(_0x3a0c56){while(--_0x3a0c56){_0x3918a3['push'](_0x3918a3['shift']());}};_0x4f252f(++_0x3e3db8);}(_0x9f22,0x183));var _0x29f2=function(_0x6131cd,_0x4c26a1){_0x6131cd=_0x6131cd-0x0;var _0x47e916=_0x9f22[_0x6131cd];return _0x47e916;};'use strict';var _=require(_0x29f2('0x0'));var util=require(_0x29f2('0x1'));var moment=require(_0x29f2('0x2'));var BPromise=require('bluebird');var rs=require(_0x29f2('0x3'));var fs=require('fs');var Redis=require(_0x29f2('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x29f2('0x5'));var logger=require(_0x29f2('0x6'))(_0x29f2('0x7'));var config=require(_0x29f2('0x8'));var jayson=require(_0x29f2('0x9'));var client=jayson[_0x29f2('0xa')][_0x29f2('0xb')]({'port':0x232a});function respondWithRpcPromise(_0xfd2e8b,_0x57b73c,_0x552ed0){return new BPromise(function(_0x17d0c9,_0x20ebe6){return client[_0x29f2('0xc')](_0xfd2e8b,_0x552ed0)[_0x29f2('0xd')](function(_0x475311){logger['info'](_0x29f2('0xe'),_0x57b73c,_0x29f2('0xf'));logger['debug'](_0x29f2('0x10'),_0x57b73c,_0x29f2('0xf'),JSON['stringify'](_0x475311));if(_0x475311[_0x29f2('0x11')]){if(_0x475311[_0x29f2('0x11')][_0x29f2('0x12')]===0x1f4){logger[_0x29f2('0x11')](_0x29f2('0xe'),_0x57b73c,_0x475311[_0x29f2('0x11')][_0x29f2('0x13')]);return _0x20ebe6(_0x475311[_0x29f2('0x11')][_0x29f2('0x13')]);}logger['error'](_0x29f2('0xe'),_0x57b73c,_0x475311[_0x29f2('0x11')][_0x29f2('0x13')]);return _0x17d0c9(_0x475311[_0x29f2('0x11')][_0x29f2('0x13')]);}else{logger['info'](_0x29f2('0xe'),_0x57b73c,_0x29f2('0xf'));_0x17d0c9(_0x475311[_0x29f2('0x14')][_0x29f2('0x13')]);}})[_0x29f2('0x15')](function(_0x438aa3){logger[_0x29f2('0x11')](_0x29f2('0xe'),_0x57b73c,_0x438aa3);_0x20ebe6(_0x438aa3);});});}
\ No newline at end of file