Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / server / api / chatProactiveAction / chatProactiveAction.rpc.js
index 1f5ff19..37358c8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7488=['../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','ChatProactiveAction,\x20%s,\x20%s','request\x20sent','debug','ChatProactiveAction,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result','catch','lodash','util','moment','bluebird','ioredis'];(function(_0x382602,_0x5e9d2d){var _0x14dda6=function(_0xf65c39){while(--_0xf65c39){_0x382602['push'](_0x382602['shift']());}};_0x14dda6(++_0x5e9d2d);}(_0x7488,0x8b));var _0x8748=function(_0x1f1ed0,_0x33d422){_0x1f1ed0=_0x1f1ed0-0x0;var _0x4a85cc=_0x7488[_0x1f1ed0];return _0x4a85cc;};'use strict';var _=require(_0x8748('0x0'));var util=require(_0x8748('0x1'));var moment=require(_0x8748('0x2'));var BPromise=require(_0x8748('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x8748('0x4'));var db=require(_0x8748('0x5'))['db'];var utils=require(_0x8748('0x6'));var logger=require(_0x8748('0x7'))(_0x8748('0x8'));var config=require('../../config/environment');var jayson=require(_0x8748('0x9'));var client=jayson[_0x8748('0xa')][_0x8748('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x47b196,_0x16d7c0,_0x125ff4){return new BPromise(function(_0x57fc10,_0x55a929){return client[_0x8748('0xc')](_0x47b196,_0x125ff4)[_0x8748('0xd')](function(_0x424f03){logger['info'](_0x8748('0xe'),_0x16d7c0,_0x8748('0xf'));logger[_0x8748('0x10')](_0x8748('0x11'),_0x16d7c0,'request\x20sent',JSON[_0x8748('0x12')](_0x424f03));if(_0x424f03[_0x8748('0x13')]){if(_0x424f03[_0x8748('0x13')]['code']===0x1f4){logger[_0x8748('0x13')](_0x8748('0xe'),_0x16d7c0,_0x424f03['error'][_0x8748('0x14')]);return _0x55a929(_0x424f03[_0x8748('0x13')]['message']);}logger['error'](_0x8748('0xe'),_0x16d7c0,_0x424f03[_0x8748('0x13')][_0x8748('0x14')]);return _0x57fc10(_0x424f03[_0x8748('0x13')][_0x8748('0x14')]);}else{logger[_0x8748('0x15')](_0x8748('0xe'),_0x16d7c0,_0x8748('0xf'));_0x57fc10(_0x424f03[_0x8748('0x16')][_0x8748('0x14')]);}})[_0x8748('0x17')](function(_0x5d1ac7){logger[_0x8748('0x13')](_0x8748('0xe'),_0x16d7c0,_0x5d1ac7);_0x55a929(_0x5d1ac7);});});}
\ No newline at end of file
+var _0x7f39=['error','code','message','result','catch','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','info','ChatProactiveAction,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x1c32ae,_0x2321a0){var _0x233e0a=function(_0x72eb40){while(--_0x72eb40){_0x1c32ae['push'](_0x1c32ae['shift']());}};_0x233e0a(++_0x2321a0);}(_0x7f39,0x131));var _0x97f3=function(_0x44946b,_0xf874ec){_0x44946b=_0x44946b-0x0;var _0x249bc4=_0x7f39[_0x44946b];return _0x249bc4;};'use strict';var _=require('lodash');var util=require(_0x97f3('0x0'));var moment=require(_0x97f3('0x1'));var BPromise=require(_0x97f3('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x97f3('0x3'))['db'];var utils=require(_0x97f3('0x4'));var logger=require(_0x97f3('0x5'))(_0x97f3('0x6'));var config=require(_0x97f3('0x7'));var jayson=require(_0x97f3('0x8'));var client=jayson['client'][_0x97f3('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1bf85,_0x25a63b,_0x90366e){return new BPromise(function(_0x2a44f2,_0x31866f){return client[_0x97f3('0xa')](_0x1bf85,_0x90366e)['then'](function(_0x5c9711){logger[_0x97f3('0xb')](_0x97f3('0xc'),_0x25a63b,_0x97f3('0xd'));logger[_0x97f3('0xe')]('ChatProactiveAction,\x20%s,\x20%s,\x20%s',_0x25a63b,'request\x20sent',JSON['stringify'](_0x5c9711));if(_0x5c9711[_0x97f3('0xf')]){if(_0x5c9711[_0x97f3('0xf')][_0x97f3('0x10')]===0x1f4){logger[_0x97f3('0xf')](_0x97f3('0xc'),_0x25a63b,_0x5c9711[_0x97f3('0xf')][_0x97f3('0x11')]);return _0x31866f(_0x5c9711['error'][_0x97f3('0x11')]);}logger[_0x97f3('0xf')]('ChatProactiveAction,\x20%s,\x20%s',_0x25a63b,_0x5c9711[_0x97f3('0xf')][_0x97f3('0x11')]);return _0x2a44f2(_0x5c9711['error'][_0x97f3('0x11')]);}else{logger[_0x97f3('0xb')]('ChatProactiveAction,\x20%s,\x20%s',_0x25a63b,_0x97f3('0xd'));_0x2a44f2(_0x5c9711[_0x97f3('0x12')][_0x97f3('0x11')]);}})[_0x97f3('0x13')](function(_0x509439){logger[_0x97f3('0xf')]('ChatProactiveAction,\x20%s,\x20%s',_0x25a63b,_0x509439);_0x31866f(_0x509439);});});}
\ No newline at end of file