Built motion from commit (unavailable).|2.5.6
[motion2.git] / server / api / chatApplication / chatApplication.rpc.js
index 7a9f3d9..e9c732a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x222e=['code','message','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','http','request','then','info','ChatApplication,\x20%s,\x20%s','debug','request\x20sent','error'];(function(_0x3947c9,_0x4d6c97){var _0x2e7871=function(_0x1236cc){while(--_0x1236cc){_0x3947c9['push'](_0x3947c9['shift']());}};_0x2e7871(++_0x4d6c97);}(_0x222e,0x134));var _0xe222=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x222e[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0xe222('0x0'));var rs=require(_0xe222('0x1'));var fs=require('fs');var Redis=require(_0xe222('0x2'));var db=require('../../mysqldb')['db'];var utils=require(_0xe222('0x3'));var logger=require(_0xe222('0x4'))(_0xe222('0x5'));var config=require(_0xe222('0x6'));var jayson=require('jayson/promise');var client=jayson['client'][_0xe222('0x7')]({'port':0x232a});function respondWithRpcPromise(_0xa7551c,_0x271c6c,_0x2153b1){return new BPromise(function(_0x585bd4,_0x235132){return client[_0xe222('0x8')](_0xa7551c,_0x2153b1)[_0xe222('0x9')](function(_0x1160bc){logger[_0xe222('0xa')](_0xe222('0xb'),_0x271c6c,'request\x20sent');logger[_0xe222('0xc')]('ChatApplication,\x20%s,\x20%s,\x20%s',_0x271c6c,_0xe222('0xd'),JSON['stringify'](_0x1160bc));if(_0x1160bc[_0xe222('0xe')]){if(_0x1160bc['error'][_0xe222('0xf')]===0x1f4){logger[_0xe222('0xe')]('ChatApplication,\x20%s,\x20%s',_0x271c6c,_0x1160bc[_0xe222('0xe')][_0xe222('0x10')]);return _0x235132(_0x1160bc[_0xe222('0xe')]['message']);}logger[_0xe222('0xe')](_0xe222('0xb'),_0x271c6c,_0x1160bc[_0xe222('0xe')][_0xe222('0x10')]);return _0x585bd4(_0x1160bc[_0xe222('0xe')]['message']);}else{logger[_0xe222('0xa')](_0xe222('0xb'),_0x271c6c,_0xe222('0xd'));_0x585bd4(_0x1160bc['result'][_0xe222('0x10')]);}})['catch'](function(_0xedae2d){logger[_0xe222('0xe')]('ChatApplication,\x20%s,\x20%s',_0x271c6c,_0xedae2d);_0x235132(_0xedae2d);});});}
\ No newline at end of file
+var _0x79a7=['code','message','info','result','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','ChatApplication,\x20%s,\x20%s','debug','ChatApplication,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error'];(function(_0x30cd7e,_0x4db10a){var _0x462a02=function(_0x157d81){while(--_0x157d81){_0x30cd7e['push'](_0x30cd7e['shift']());}};_0x462a02(++_0x4db10a);}(_0x79a7,0x180));var _0x779a=function(_0x476edf,_0x496308){_0x476edf=_0x476edf-0x0;var _0x2b9145=_0x79a7[_0x476edf];return _0x2b9145;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x779a('0x0'));var fs=require('fs');var Redis=require(_0x779a('0x1'));var db=require('../../mysqldb')['db'];var utils=require(_0x779a('0x2'));var logger=require(_0x779a('0x3'))(_0x779a('0x4'));var config=require(_0x779a('0x5'));var jayson=require(_0x779a('0x6'));var client=jayson[_0x779a('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1bbd90,_0x14f8e2,_0x31dc2b){return new BPromise(function(_0x50774c,_0x219762){return client[_0x779a('0x8')](_0x1bbd90,_0x31dc2b)[_0x779a('0x9')](function(_0x341e80){logger['info'](_0x779a('0xa'),_0x14f8e2,'request\x20sent');logger[_0x779a('0xb')](_0x779a('0xc'),_0x14f8e2,_0x779a('0xd'),JSON[_0x779a('0xe')](_0x341e80));if(_0x341e80[_0x779a('0xf')]){if(_0x341e80[_0x779a('0xf')][_0x779a('0x10')]===0x1f4){logger[_0x779a('0xf')](_0x779a('0xa'),_0x14f8e2,_0x341e80[_0x779a('0xf')][_0x779a('0x11')]);return _0x219762(_0x341e80[_0x779a('0xf')][_0x779a('0x11')]);}logger[_0x779a('0xf')](_0x779a('0xa'),_0x14f8e2,_0x341e80['error'][_0x779a('0x11')]);return _0x50774c(_0x341e80['error'][_0x779a('0x11')]);}else{logger[_0x779a('0x12')](_0x779a('0xa'),_0x14f8e2,_0x779a('0xd'));_0x50774c(_0x341e80[_0x779a('0x13')][_0x779a('0x11')]);}})['catch'](function(_0xbb6a0a){logger[_0x779a('0xf')](_0x779a('0xa'),_0x14f8e2,_0xbb6a0a);_0x219762(_0xbb6a0a);});});}
\ No newline at end of file