Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / api / chatProactiveAction / chatProactiveAction.rpc.js
index 393d7db..7c25841 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0f51=['moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','ChatProactiveAction,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','info','catch','util'];(function(_0x8a5128,_0x31286d){var _0x12b427=function(_0x2b9636){while(--_0x2b9636){_0x8a5128['push'](_0x8a5128['shift']());}};_0x12b427(++_0x31286d);}(_0x0f51,0x125));var _0x10f5=function(_0x15599c,_0x1ebd6a){_0x15599c=_0x15599c-0x0;var _0x5f1b30=_0x0f51[_0x15599c];return _0x5f1b30;};'use strict';var _=require('lodash');var util=require(_0x10f5('0x0'));var moment=require(_0x10f5('0x1'));var BPromise=require(_0x10f5('0x2'));var rs=require(_0x10f5('0x3'));var fs=require('fs');var Redis=require(_0x10f5('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x10f5('0x5'));var logger=require(_0x10f5('0x6'))('rpc');var config=require(_0x10f5('0x7'));var jayson=require(_0x10f5('0x8'));var client=jayson[_0x10f5('0x9')][_0x10f5('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2f8390,_0x2b7322,_0x28c2f3){return new BPromise(function(_0x43c52c,_0x244cc1){return client[_0x10f5('0xb')](_0x2f8390,_0x28c2f3)[_0x10f5('0xc')](function(_0xe11162){logger['info'](_0x10f5('0xd'),_0x2b7322,_0x10f5('0xe'));logger[_0x10f5('0xf')]('ChatProactiveAction,\x20%s,\x20%s,\x20%s',_0x2b7322,_0x10f5('0xe'),JSON[_0x10f5('0x10')](_0xe11162));if(_0xe11162['error']){if(_0xe11162[_0x10f5('0x11')]['code']===0x1f4){logger['error']('ChatProactiveAction,\x20%s,\x20%s',_0x2b7322,_0xe11162[_0x10f5('0x11')][_0x10f5('0x12')]);return _0x244cc1(_0xe11162[_0x10f5('0x11')][_0x10f5('0x12')]);}logger[_0x10f5('0x11')](_0x10f5('0xd'),_0x2b7322,_0xe11162[_0x10f5('0x11')][_0x10f5('0x12')]);return _0x43c52c(_0xe11162[_0x10f5('0x11')][_0x10f5('0x12')]);}else{logger[_0x10f5('0x13')](_0x10f5('0xd'),_0x2b7322,_0x10f5('0xe'));_0x43c52c(_0xe11162['result'][_0x10f5('0x12')]);}})[_0x10f5('0x14')](function(_0x3dfdaf){logger[_0x10f5('0x11')](_0x10f5('0xd'),_0x2b7322,_0x3dfdaf);_0x244cc1(_0x3dfdaf);});});}
\ No newline at end of file
+var _0xa076=['jayson/promise','client','http','then','info','ChatProactiveAction,\x20%s,\x20%s','debug','ChatProactiveAction,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','result','catch','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','../../config/environment'];(function(_0x1c22ac,_0x4c86bd){var _0x4c867a=function(_0x370c7d){while(--_0x370c7d){_0x1c22ac['push'](_0x1c22ac['shift']());}};_0x4c867a(++_0x4c86bd);}(_0xa076,0x19d));var _0x6a07=function(_0x2ea6af,_0x255d1c){_0x2ea6af=_0x2ea6af-0x0;var _0x28bfc6=_0xa076[_0x2ea6af];return _0x28bfc6;};'use strict';var _=require(_0x6a07('0x0'));var util=require(_0x6a07('0x1'));var moment=require(_0x6a07('0x2'));var BPromise=require('bluebird');var rs=require(_0x6a07('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x6a07('0x4'))['db'];var utils=require(_0x6a07('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0x6a07('0x6'));var jayson=require(_0x6a07('0x7'));var client=jayson[_0x6a07('0x8')][_0x6a07('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x97a87e,_0x2f208c,_0x38db1c){return new BPromise(function(_0x5de94c,_0x4f6582){return client['request'](_0x97a87e,_0x38db1c)[_0x6a07('0xa')](function(_0x55c469){logger[_0x6a07('0xb')](_0x6a07('0xc'),_0x2f208c,'request\x20sent');logger[_0x6a07('0xd')](_0x6a07('0xe'),_0x2f208c,_0x6a07('0xf'),JSON['stringify'](_0x55c469));if(_0x55c469[_0x6a07('0x10')]){if(_0x55c469['error'][_0x6a07('0x11')]===0x1f4){logger['error']('ChatProactiveAction,\x20%s,\x20%s',_0x2f208c,_0x55c469[_0x6a07('0x10')][_0x6a07('0x12')]);return _0x4f6582(_0x55c469[_0x6a07('0x10')][_0x6a07('0x12')]);}logger[_0x6a07('0x10')]('ChatProactiveAction,\x20%s,\x20%s',_0x2f208c,_0x55c469['error'][_0x6a07('0x12')]);return _0x5de94c(_0x55c469[_0x6a07('0x10')]['message']);}else{logger['info'](_0x6a07('0xc'),_0x2f208c,_0x6a07('0xf'));_0x5de94c(_0x55c469[_0x6a07('0x13')][_0x6a07('0x12')]);}})[_0x6a07('0x14')](function(_0x173c46){logger[_0x6a07('0x10')](_0x6a07('0xc'),_0x2f208c,_0x173c46);_0x4f6582(_0x173c46);});});}
\ No newline at end of file