Built motion from commit b5413ace.|2.6.9
[motion2.git] / server / api / chatProactiveAction / chatProactiveAction.rpc.js
index 0309196..dade101 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x26f2=['rpc','../../config/environment','jayson/promise','client','http','request','then','info','ChatProactiveAction,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger'];(function(_0x12f5f7,_0xa58b52){var _0x345c1b=function(_0x306035){while(--_0x306035){_0x12f5f7['push'](_0x12f5f7['shift']());}};_0x345c1b(++_0xa58b52);}(_0x26f2,0x1dc));var _0x226f=function(_0x3848bc,_0x25ff83){_0x3848bc=_0x3848bc-0x0;var _0x334a5a=_0x26f2[_0x3848bc];return _0x334a5a;};'use strict';var _=require('lodash');var util=require(_0x226f('0x0'));var moment=require(_0x226f('0x1'));var BPromise=require(_0x226f('0x2'));var rs=require(_0x226f('0x3'));var fs=require('fs');var Redis=require(_0x226f('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x226f('0x5'));var logger=require(_0x226f('0x6'))(_0x226f('0x7'));var config=require(_0x226f('0x8'));var jayson=require(_0x226f('0x9'));var client=jayson[_0x226f('0xa')][_0x226f('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x37121d,_0x2f37be,_0x21594f){return new BPromise(function(_0x367ce2,_0x15d0a1){return client[_0x226f('0xc')](_0x37121d,_0x21594f)[_0x226f('0xd')](function(_0x451c82){logger[_0x226f('0xe')](_0x226f('0xf'),_0x2f37be,_0x226f('0x10'));logger[_0x226f('0x11')]('ChatProactiveAction,\x20%s,\x20%s,\x20%s',_0x2f37be,_0x226f('0x10'),JSON[_0x226f('0x12')](_0x451c82));if(_0x451c82[_0x226f('0x13')]){if(_0x451c82[_0x226f('0x13')][_0x226f('0x14')]===0x1f4){logger[_0x226f('0x13')](_0x226f('0xf'),_0x2f37be,_0x451c82['error'][_0x226f('0x15')]);return _0x15d0a1(_0x451c82[_0x226f('0x13')][_0x226f('0x15')]);}logger[_0x226f('0x13')]('ChatProactiveAction,\x20%s,\x20%s',_0x2f37be,_0x451c82[_0x226f('0x13')]['message']);return _0x367ce2(_0x451c82[_0x226f('0x13')][_0x226f('0x15')]);}else{logger[_0x226f('0xe')](_0x226f('0xf'),_0x2f37be,_0x226f('0x10'));_0x367ce2(_0x451c82[_0x226f('0x16')][_0x226f('0x15')]);}})['catch'](function(_0x9324bd){logger[_0x226f('0x13')](_0x226f('0xf'),_0x2f37be,_0x9324bd);_0x15d0a1(_0x9324bd);});});}
\ No newline at end of file
+var _0x8347=['util','bluebird','ioredis','../../config/utils','../../config/logger','client','http','request','then','info','request\x20sent','stringify','error','code','ChatProactiveAction,\x20%s,\x20%s','message','result','catch','lodash'];(function(_0x588b49,_0x1bc27e){var _0x20079e=function(_0x784472){while(--_0x784472){_0x588b49['push'](_0x588b49['shift']());}};_0x20079e(++_0x1bc27e);}(_0x8347,0x142));var _0x7834=function(_0x3bbc13,_0x4ea5da){_0x3bbc13=_0x3bbc13-0x0;var _0x3e73fc=_0x8347[_0x3bbc13];return _0x3e73fc;};'use strict';var _=require(_0x7834('0x0'));var util=require(_0x7834('0x1'));var moment=require('moment');var BPromise=require(_0x7834('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7834('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x7834('0x4'));var logger=require(_0x7834('0x5'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x7834('0x6')][_0x7834('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x27b8ea,_0x4bc03c,_0xeba0cb){return new BPromise(function(_0x1945e4,_0x356f51){return client[_0x7834('0x8')](_0x27b8ea,_0xeba0cb)[_0x7834('0x9')](function(_0x4c4991){logger[_0x7834('0xa')]('ChatProactiveAction,\x20%s,\x20%s',_0x4bc03c,_0x7834('0xb'));logger['debug']('ChatProactiveAction,\x20%s,\x20%s,\x20%s',_0x4bc03c,_0x7834('0xb'),JSON[_0x7834('0xc')](_0x4c4991));if(_0x4c4991[_0x7834('0xd')]){if(_0x4c4991['error'][_0x7834('0xe')]===0x1f4){logger[_0x7834('0xd')](_0x7834('0xf'),_0x4bc03c,_0x4c4991[_0x7834('0xd')]['message']);return _0x356f51(_0x4c4991[_0x7834('0xd')][_0x7834('0x10')]);}logger['error']('ChatProactiveAction,\x20%s,\x20%s',_0x4bc03c,_0x4c4991[_0x7834('0xd')][_0x7834('0x10')]);return _0x1945e4(_0x4c4991[_0x7834('0xd')][_0x7834('0x10')]);}else{logger['info'](_0x7834('0xf'),_0x4bc03c,'request\x20sent');_0x1945e4(_0x4c4991[_0x7834('0x11')][_0x7834('0x10')]);}})[_0x7834('0x12')](function(_0x104e9a){logger['error'](_0x7834('0xf'),_0x4bc03c,_0x104e9a);_0x356f51(_0x104e9a);});});}
\ No newline at end of file