Built motion from commit (unavailable).|2.4.4
[motion2.git] / server / api / chatApplication / chatApplication.rpc.js
index 093a3f1..ff796f0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd92e=['jayson/promise','client','http','request','ChatApplication,\x20%s,\x20%s','request\x20sent','debug','error','message','info','result','lodash','util','moment','randomstring','ioredis','../../config/logger','rpc'];(function(_0x33e5da,_0x1ff737){var _0x1734a1=function(_0x2445d0){while(--_0x2445d0){_0x33e5da['push'](_0x33e5da['shift']());}};_0x1734a1(++_0x1ff737);}(_0xd92e,0xd1));var _0xed92=function(_0x459886,_0x50285d){_0x459886=_0x459886-0x0;var _0x494dd5=_0xd92e[_0x459886];return _0x494dd5;};'use strict';var _=require(_0xed92('0x0'));var util=require(_0xed92('0x1'));var moment=require(_0xed92('0x2'));var BPromise=require('bluebird');var rs=require(_0xed92('0x3'));var fs=require('fs');var Redis=require(_0xed92('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xed92('0x5'))(_0xed92('0x6'));var config=require('../../config/environment');var jayson=require(_0xed92('0x7'));var client=jayson[_0xed92('0x8')][_0xed92('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x164bc5,_0x51c4b0,_0x12d8c5){return new BPromise(function(_0x3bf74d,_0x28fcac){return client[_0xed92('0xa')](_0x164bc5,_0x12d8c5)['then'](function(_0xc3b78){logger['info'](_0xed92('0xb'),_0x51c4b0,_0xed92('0xc'));logger[_0xed92('0xd')]('ChatApplication,\x20%s,\x20%s,\x20%s',_0x51c4b0,'request\x20sent',JSON['stringify'](_0xc3b78));if(_0xc3b78['error']){if(_0xc3b78[_0xed92('0xe')]['code']===0x1f4){logger[_0xed92('0xe')](_0xed92('0xb'),_0x51c4b0,_0xc3b78[_0xed92('0xe')]['message']);return _0x28fcac(_0xc3b78[_0xed92('0xe')][_0xed92('0xf')]);}logger['error']('ChatApplication,\x20%s,\x20%s',_0x51c4b0,_0xc3b78[_0xed92('0xe')]['message']);return _0x3bf74d(_0xc3b78[_0xed92('0xe')][_0xed92('0xf')]);}else{logger[_0xed92('0x10')](_0xed92('0xb'),_0x51c4b0,'request\x20sent');_0x3bf74d(_0xc3b78[_0xed92('0x11')][_0xed92('0xf')]);}})['catch'](function(_0x4814dd){logger[_0xed92('0xe')](_0xed92('0xb'),_0x51c4b0,_0x4814dd);_0x28fcac(_0x4814dd);});});}
\ No newline at end of file
+var _0x5612=['info','request\x20sent','ChatApplication,\x20%s,\x20%s,\x20%s','stringify','error','code','ChatApplication,\x20%s,\x20%s','message','catch','lodash','util','ioredis','../../config/utils','../../config/logger','jayson/promise','http','request','then'];(function(_0x5071b0,_0x4e394b){var _0x11bb82=function(_0x548097){while(--_0x548097){_0x5071b0['push'](_0x5071b0['shift']());}};_0x11bb82(++_0x4e394b);}(_0x5612,0xcf));var _0x2561=function(_0x33cece,_0x54b9da){_0x33cece=_0x33cece-0x0;var _0x1a2efd=_0x5612[_0x33cece];return _0x1a2efd;};'use strict';var _=require(_0x2561('0x0'));var util=require(_0x2561('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2561('0x2'));var db=require('../../mysqldb')['db'];var utils=require(_0x2561('0x3'));var logger=require(_0x2561('0x4'))('rpc');var config=require('../../config/environment');var jayson=require(_0x2561('0x5'));var client=jayson['client'][_0x2561('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x921eec,_0x280029,_0x28fe5f){return new BPromise(function(_0x49b74c,_0x199465){return client[_0x2561('0x7')](_0x921eec,_0x28fe5f)[_0x2561('0x8')](function(_0x196a43){logger[_0x2561('0x9')]('ChatApplication,\x20%s,\x20%s',_0x280029,_0x2561('0xa'));logger['debug'](_0x2561('0xb'),_0x280029,'request\x20sent',JSON[_0x2561('0xc')](_0x196a43));if(_0x196a43[_0x2561('0xd')]){if(_0x196a43[_0x2561('0xd')][_0x2561('0xe')]===0x1f4){logger[_0x2561('0xd')](_0x2561('0xf'),_0x280029,_0x196a43['error'][_0x2561('0x10')]);return _0x199465(_0x196a43[_0x2561('0xd')][_0x2561('0x10')]);}logger[_0x2561('0xd')](_0x2561('0xf'),_0x280029,_0x196a43['error']['message']);return _0x49b74c(_0x196a43['error']['message']);}else{logger[_0x2561('0x9')](_0x2561('0xf'),_0x280029,_0x2561('0xa'));_0x49b74c(_0x196a43['result'][_0x2561('0x10')]);}})[_0x2561('0x11')](function(_0x2cd2bb){logger[_0x2561('0xd')](_0x2561('0xf'),_0x280029,_0x2cd2bb);_0x199465(_0x2cd2bb);});});}
\ No newline at end of file