Built motion from commit (unavailable).|2.5.6
[motion2.git] / server / api / chatApplication / chatApplication.rpc.js
index 1cbf6b2..930a482 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5f23=['../../config/logger','rpc','../../config/environment','http','request','then','request\x20sent','debug','ChatApplication,\x20%s,\x20%s,\x20%s','stringify','error','message','ChatApplication,\x20%s,\x20%s','result','catch','util','moment','bluebird','randomstring','ioredis','../../config/utils'];(function(_0x122d2b,_0x70044d){var _0x55ac23=function(_0x1a954b){while(--_0x1a954b){_0x122d2b['push'](_0x122d2b['shift']());}};_0x55ac23(++_0x70044d);}(_0x5f23,0xb7));var _0x35f2=function(_0x418a0e,_0x45a42e){_0x418a0e=_0x418a0e-0x0;var _0x1c76e9=_0x5f23[_0x418a0e];return _0x1c76e9;};'use strict';var _=require('lodash');var util=require(_0x35f2('0x0'));var moment=require(_0x35f2('0x1'));var BPromise=require(_0x35f2('0x2'));var rs=require(_0x35f2('0x3'));var fs=require('fs');var Redis=require(_0x35f2('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x35f2('0x5'));var logger=require(_0x35f2('0x6'))(_0x35f2('0x7'));var config=require(_0x35f2('0x8'));var jayson=require('jayson/promise');var client=jayson['client'][_0x35f2('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1839dc,_0x125995,_0x418063){return new BPromise(function(_0x636fd7,_0x5282ec){return client[_0x35f2('0xa')](_0x1839dc,_0x418063)[_0x35f2('0xb')](function(_0x4e7723){logger['info']('ChatApplication,\x20%s,\x20%s',_0x125995,_0x35f2('0xc'));logger[_0x35f2('0xd')](_0x35f2('0xe'),_0x125995,_0x35f2('0xc'),JSON[_0x35f2('0xf')](_0x4e7723));if(_0x4e7723[_0x35f2('0x10')]){if(_0x4e7723[_0x35f2('0x10')]['code']===0x1f4){logger[_0x35f2('0x10')]('ChatApplication,\x20%s,\x20%s',_0x125995,_0x4e7723[_0x35f2('0x10')][_0x35f2('0x11')]);return _0x5282ec(_0x4e7723['error']['message']);}logger[_0x35f2('0x10')]('ChatApplication,\x20%s,\x20%s',_0x125995,_0x4e7723['error'][_0x35f2('0x11')]);return _0x636fd7(_0x4e7723['error'][_0x35f2('0x11')]);}else{logger['info'](_0x35f2('0x12'),_0x125995,_0x35f2('0xc'));_0x636fd7(_0x4e7723[_0x35f2('0x13')][_0x35f2('0x11')]);}})[_0x35f2('0x14')](function(_0x3bfdd5){logger[_0x35f2('0x10')](_0x35f2('0x12'),_0x125995,_0x3bfdd5);_0x5282ec(_0x3bfdd5);});});}
\ No newline at end of file
+var _0x0399=['rpc','../../config/environment','jayson/promise','client','http','request','then','info','ChatApplication,\x20%s,\x20%s','request\x20sent','debug','ChatApplication,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger'];(function(_0xf0ca90,_0x51f9a8){var _0x397828=function(_0x3010ec){while(--_0x3010ec){_0xf0ca90['push'](_0xf0ca90['shift']());}};_0x397828(++_0x51f9a8);}(_0x0399,0x1a9));var _0x9039=function(_0x59ee6f,_0x450239){_0x59ee6f=_0x59ee6f-0x0;var _0x4c0979=_0x0399[_0x59ee6f];return _0x4c0979;};'use strict';var _=require(_0x9039('0x0'));var util=require(_0x9039('0x1'));var moment=require(_0x9039('0x2'));var BPromise=require(_0x9039('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x9039('0x4'))['db'];var utils=require(_0x9039('0x5'));var logger=require(_0x9039('0x6'))(_0x9039('0x7'));var config=require(_0x9039('0x8'));var jayson=require(_0x9039('0x9'));var client=jayson[_0x9039('0xa')][_0x9039('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x5b3f10,_0x34dd5d,_0x3d0c6f){return new BPromise(function(_0x591be9,_0x41a17e){return client[_0x9039('0xc')](_0x5b3f10,_0x3d0c6f)[_0x9039('0xd')](function(_0x1ea405){logger[_0x9039('0xe')](_0x9039('0xf'),_0x34dd5d,_0x9039('0x10'));logger[_0x9039('0x11')](_0x9039('0x12'),_0x34dd5d,'request\x20sent',JSON[_0x9039('0x13')](_0x1ea405));if(_0x1ea405[_0x9039('0x14')]){if(_0x1ea405[_0x9039('0x14')]['code']===0x1f4){logger[_0x9039('0x14')](_0x9039('0xf'),_0x34dd5d,_0x1ea405[_0x9039('0x14')][_0x9039('0x15')]);return _0x41a17e(_0x1ea405[_0x9039('0x14')][_0x9039('0x15')]);}logger[_0x9039('0x14')](_0x9039('0xf'),_0x34dd5d,_0x1ea405[_0x9039('0x14')][_0x9039('0x15')]);return _0x591be9(_0x1ea405['error'][_0x9039('0x15')]);}else{logger[_0x9039('0xe')](_0x9039('0xf'),_0x34dd5d,_0x9039('0x10'));_0x591be9(_0x1ea405[_0x9039('0x16')]['message']);}})[_0x9039('0x17')](function(_0x24a611){logger[_0x9039('0x14')](_0x9039('0xf'),_0x34dd5d,_0x24a611);_0x41a17e(_0x24a611);});});}
\ No newline at end of file