Built motion from commit 85328c08.|2.5.50
[motion2.git] / server / api / chatApplication / chatApplication.rpc.js
index 4af4b75..71839fd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd6b3=['ChatApplication,\x20%s,\x20%s,\x20%s','stringify','error','message','info','request\x20sent','result','catch','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','client','http','request','then','ChatApplication,\x20%s,\x20%s','debug'];(function(_0x491d62,_0x2d17fd){var _0x18002b=function(_0x3c7b03){while(--_0x3c7b03){_0x491d62['push'](_0x491d62['shift']());}};_0x18002b(++_0x2d17fd);}(_0xd6b3,0x168));var _0x3d6b=function(_0x45b69d,_0x3c11f8){_0x45b69d=_0x45b69d-0x0;var _0x4b0da9=_0xd6b3[_0x45b69d];return _0x4b0da9;};'use strict';var _=require(_0x3d6b('0x0'));var util=require(_0x3d6b('0x1'));var moment=require(_0x3d6b('0x2'));var BPromise=require('bluebird');var rs=require(_0x3d6b('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x3d6b('0x4'))['db'];var utils=require(_0x3d6b('0x5'));var logger=require(_0x3d6b('0x6'))(_0x3d6b('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x3d6b('0x8')][_0x3d6b('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x449759,_0xf97338,_0x47433d){return new BPromise(function(_0x50cf13,_0x5c5c49){return client[_0x3d6b('0xa')](_0x449759,_0x47433d)[_0x3d6b('0xb')](function(_0x35f682){logger['info'](_0x3d6b('0xc'),_0xf97338,'request\x20sent');logger[_0x3d6b('0xd')](_0x3d6b('0xe'),_0xf97338,'request\x20sent',JSON[_0x3d6b('0xf')](_0x35f682));if(_0x35f682[_0x3d6b('0x10')]){if(_0x35f682['error']['code']===0x1f4){logger[_0x3d6b('0x10')](_0x3d6b('0xc'),_0xf97338,_0x35f682['error']['message']);return _0x5c5c49(_0x35f682['error'][_0x3d6b('0x11')]);}logger[_0x3d6b('0x10')]('ChatApplication,\x20%s,\x20%s',_0xf97338,_0x35f682[_0x3d6b('0x10')][_0x3d6b('0x11')]);return _0x50cf13(_0x35f682[_0x3d6b('0x10')][_0x3d6b('0x11')]);}else{logger[_0x3d6b('0x12')]('ChatApplication,\x20%s,\x20%s',_0xf97338,_0x3d6b('0x13'));_0x50cf13(_0x35f682[_0x3d6b('0x14')][_0x3d6b('0x11')]);}})[_0x3d6b('0x15')](function(_0x20b91c){logger[_0x3d6b('0x10')](_0x3d6b('0xc'),_0xf97338,_0x20b91c);_0x5c5c49(_0x20b91c);});});}
\ No newline at end of file
+var _0xcbf8=['code','ChatApplication,\x20%s,\x20%s','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','http','request','then','info','request\x20sent','debug','ChatApplication,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x25e7cb,_0x3579b7){var _0x375d92=function(_0xe8cf3b){while(--_0xe8cf3b){_0x25e7cb['push'](_0x25e7cb['shift']());}};_0x375d92(++_0x3579b7);}(_0xcbf8,0x118));var _0x8cbf=function(_0x5b73ac,_0x4a1422){_0x5b73ac=_0x5b73ac-0x0;var _0x32bcdf=_0xcbf8[_0x5b73ac];return _0x32bcdf;};'use strict';var _=require(_0x8cbf('0x0'));var util=require(_0x8cbf('0x1'));var moment=require(_0x8cbf('0x2'));var BPromise=require(_0x8cbf('0x3'));var rs=require(_0x8cbf('0x4'));var fs=require('fs');var Redis=require(_0x8cbf('0x5'));var db=require(_0x8cbf('0x6'))['db'];var utils=require(_0x8cbf('0x7'));var logger=require(_0x8cbf('0x8'))(_0x8cbf('0x9'));var config=require(_0x8cbf('0xa'));var jayson=require('jayson/promise');var client=jayson['client'][_0x8cbf('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x4625cd,_0x3bbcfe,_0x2bb948){return new BPromise(function(_0x936320,_0x425ade){return client[_0x8cbf('0xc')](_0x4625cd,_0x2bb948)[_0x8cbf('0xd')](function(_0x5e1005){logger[_0x8cbf('0xe')]('ChatApplication,\x20%s,\x20%s',_0x3bbcfe,_0x8cbf('0xf'));logger[_0x8cbf('0x10')](_0x8cbf('0x11'),_0x3bbcfe,_0x8cbf('0xf'),JSON[_0x8cbf('0x12')](_0x5e1005));if(_0x5e1005[_0x8cbf('0x13')]){if(_0x5e1005[_0x8cbf('0x13')][_0x8cbf('0x14')]===0x1f4){logger[_0x8cbf('0x13')](_0x8cbf('0x15'),_0x3bbcfe,_0x5e1005[_0x8cbf('0x13')]['message']);return _0x425ade(_0x5e1005['error'][_0x8cbf('0x16')]);}logger[_0x8cbf('0x13')](_0x8cbf('0x15'),_0x3bbcfe,_0x5e1005[_0x8cbf('0x13')][_0x8cbf('0x16')]);return _0x936320(_0x5e1005['error'][_0x8cbf('0x16')]);}else{logger['info']('ChatApplication,\x20%s,\x20%s',_0x3bbcfe,_0x8cbf('0xf'));_0x936320(_0x5e1005[_0x8cbf('0x17')][_0x8cbf('0x16')]);}})[_0x8cbf('0x18')](function(_0x25cc85){logger[_0x8cbf('0x13')](_0x8cbf('0x15'),_0x3bbcfe,_0x25cc85);_0x425ade(_0x25cc85);});});}
\ No newline at end of file