Built motion from commit 092f8824.|2.5.49
[motion2.git] / server / api / chatApplication / chatApplication.rpc.js
index 7dabfde..63f2cac 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x63ae=['code','ChatApplication,\x20%s,\x20%s','message','info','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','request\x20sent','debug','stringify','error'];(function(_0x46621e,_0x25b6fe){var _0x8ad717=function(_0x549164){while(--_0x549164){_0x46621e['push'](_0x46621e['shift']());}};_0x8ad717(++_0x25b6fe);}(_0x63ae,0x18c));var _0xe63a=function(_0x543638,_0x29c688){_0x543638=_0x543638-0x0;var _0xbd491e=_0x63ae[_0x543638];return _0xbd491e;};'use strict';var _=require(_0xe63a('0x0'));var util=require(_0xe63a('0x1'));var moment=require(_0xe63a('0x2'));var BPromise=require(_0xe63a('0x3'));var rs=require(_0xe63a('0x4'));var fs=require('fs');var Redis=require(_0xe63a('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xe63a('0x6'));var logger=require(_0xe63a('0x7'))('rpc');var config=require(_0xe63a('0x8'));var jayson=require(_0xe63a('0x9'));var client=jayson[_0xe63a('0xa')][_0xe63a('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x4da3df,_0x1d6c9a,_0xa4eeed){return new BPromise(function(_0x2efac1,_0x5aed37){return client[_0xe63a('0xc')](_0x4da3df,_0xa4eeed)[_0xe63a('0xd')](function(_0x227413){logger['info']('ChatApplication,\x20%s,\x20%s',_0x1d6c9a,_0xe63a('0xe'));logger[_0xe63a('0xf')]('ChatApplication,\x20%s,\x20%s,\x20%s',_0x1d6c9a,_0xe63a('0xe'),JSON[_0xe63a('0x10')](_0x227413));if(_0x227413[_0xe63a('0x11')]){if(_0x227413[_0xe63a('0x11')][_0xe63a('0x12')]===0x1f4){logger[_0xe63a('0x11')](_0xe63a('0x13'),_0x1d6c9a,_0x227413[_0xe63a('0x11')]['message']);return _0x5aed37(_0x227413[_0xe63a('0x11')][_0xe63a('0x14')]);}logger['error']('ChatApplication,\x20%s,\x20%s',_0x1d6c9a,_0x227413[_0xe63a('0x11')][_0xe63a('0x14')]);return _0x2efac1(_0x227413[_0xe63a('0x11')][_0xe63a('0x14')]);}else{logger[_0xe63a('0x15')](_0xe63a('0x13'),_0x1d6c9a,_0xe63a('0xe'));_0x2efac1(_0x227413['result']['message']);}})[_0xe63a('0x16')](function(_0x3cb93e){logger[_0xe63a('0x11')](_0xe63a('0x13'),_0x1d6c9a,_0x3cb93e);_0x5aed37(_0x3cb93e);});});}
\ No newline at end of file
+var _0x7677=['then','info','ChatApplication,\x20%s,\x20%s','request\x20sent','debug','ChatApplication,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x7677,0x129));var _0x7767=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x7677[_0x122ef9];return _0x42fba0;};'use strict';var _=require('lodash');var util=require(_0x7767('0x0'));var moment=require(_0x7767('0x1'));var BPromise=require(_0x7767('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7767('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x7767('0x4'));var logger=require(_0x7767('0x5'))(_0x7767('0x6'));var config=require(_0x7767('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x7767('0x8')][_0x7767('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2f0b61,_0x13d594,_0x3c1383){return new BPromise(function(_0xc9d8e7,_0x349303){return client[_0x7767('0xa')](_0x2f0b61,_0x3c1383)[_0x7767('0xb')](function(_0x6264f7){logger[_0x7767('0xc')](_0x7767('0xd'),_0x13d594,_0x7767('0xe'));logger[_0x7767('0xf')](_0x7767('0x10'),_0x13d594,_0x7767('0xe'),JSON[_0x7767('0x11')](_0x6264f7));if(_0x6264f7[_0x7767('0x12')]){if(_0x6264f7[_0x7767('0x12')][_0x7767('0x13')]===0x1f4){logger[_0x7767('0x12')](_0x7767('0xd'),_0x13d594,_0x6264f7[_0x7767('0x12')][_0x7767('0x14')]);return _0x349303(_0x6264f7[_0x7767('0x12')][_0x7767('0x14')]);}logger[_0x7767('0x12')](_0x7767('0xd'),_0x13d594,_0x6264f7[_0x7767('0x12')]['message']);return _0xc9d8e7(_0x6264f7[_0x7767('0x12')][_0x7767('0x14')]);}else{logger[_0x7767('0xc')](_0x7767('0xd'),_0x13d594,_0x7767('0xe'));_0xc9d8e7(_0x6264f7['result'][_0x7767('0x14')]);}})[_0x7767('0x15')](function(_0x183347){logger[_0x7767('0x12')](_0x7767('0xd'),_0x13d594,_0x183347);_0x349303(_0x183347);});});}
\ No newline at end of file