Built motion from commit da617fac.|2.6.6
[motion2.git] / server / api / chatProactiveAction / chatProactiveAction.rpc.js
index fa93406..a0800f2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe0b8=['info','request\x20sent','debug','error','code','ChatProactiveAction,\x20%s,\x20%s','message','result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/environment','client','http','then'];(function(_0x465028,_0x4570ac){var _0xb783d4=function(_0x5458c5){while(--_0x5458c5){_0x465028['push'](_0x465028['shift']());}};_0xb783d4(++_0x4570ac);}(_0xe0b8,0xe5));var _0x8e0b=function(_0x209ed7,_0x29ad03){_0x209ed7=_0x209ed7-0x0;var _0x594ff0=_0xe0b8[_0x209ed7];return _0x594ff0;};'use strict';var _=require('lodash');var util=require(_0x8e0b('0x0'));var moment=require(_0x8e0b('0x1'));var BPromise=require(_0x8e0b('0x2'));var rs=require(_0x8e0b('0x3'));var fs=require('fs');var Redis=require(_0x8e0b('0x4'));var db=require(_0x8e0b('0x5'))['db'];var utils=require(_0x8e0b('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x8e0b('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x8e0b('0x8')][_0x8e0b('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x262415,_0x2a56a1,_0x545057){return new BPromise(function(_0xd051e4,_0x1e5507){return client['request'](_0x262415,_0x545057)[_0x8e0b('0xa')](function(_0xf83eda){logger[_0x8e0b('0xb')]('ChatProactiveAction,\x20%s,\x20%s',_0x2a56a1,_0x8e0b('0xc'));logger[_0x8e0b('0xd')]('ChatProactiveAction,\x20%s,\x20%s,\x20%s',_0x2a56a1,'request\x20sent',JSON['stringify'](_0xf83eda));if(_0xf83eda[_0x8e0b('0xe')]){if(_0xf83eda['error'][_0x8e0b('0xf')]===0x1f4){logger[_0x8e0b('0xe')](_0x8e0b('0x10'),_0x2a56a1,_0xf83eda['error']['message']);return _0x1e5507(_0xf83eda[_0x8e0b('0xe')][_0x8e0b('0x11')]);}logger[_0x8e0b('0xe')](_0x8e0b('0x10'),_0x2a56a1,_0xf83eda[_0x8e0b('0xe')][_0x8e0b('0x11')]);return _0xd051e4(_0xf83eda[_0x8e0b('0xe')][_0x8e0b('0x11')]);}else{logger[_0x8e0b('0xb')](_0x8e0b('0x10'),_0x2a56a1,_0x8e0b('0xc'));_0xd051e4(_0xf83eda[_0x8e0b('0x12')][_0x8e0b('0x11')]);}})[_0x8e0b('0x13')](function(_0x18b522){logger[_0x8e0b('0xe')]('ChatProactiveAction,\x20%s,\x20%s',_0x2a56a1,_0x18b522);_0x1e5507(_0x18b522);});});}
\ No newline at end of file
+var _0xf643=['ChatProactiveAction,\x20%s,\x20%s','message','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','http','request','info','request\x20sent','debug','ChatProactiveAction,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x49ca18,_0x5e6d05){var _0x145d54=function(_0x30b9be){while(--_0x30b9be){_0x49ca18['push'](_0x49ca18['shift']());}};_0x145d54(++_0x5e6d05);}(_0xf643,0xde));var _0x3f64=function(_0x27af08,_0x192c31){_0x27af08=_0x27af08-0x0;var _0x49eb8e=_0xf643[_0x27af08];return _0x49eb8e;};'use strict';var _=require(_0x3f64('0x0'));var util=require(_0x3f64('0x1'));var moment=require(_0x3f64('0x2'));var BPromise=require('bluebird');var rs=require(_0x3f64('0x3'));var fs=require('fs');var Redis=require(_0x3f64('0x4'));var db=require(_0x3f64('0x5'))['db'];var utils=require(_0x3f64('0x6'));var logger=require(_0x3f64('0x7'))(_0x3f64('0x8'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0x3f64('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2ce1d1,_0x1ecb67,_0x2ba99b){return new BPromise(function(_0x29c7cc,_0x5dec7c){return client[_0x3f64('0xa')](_0x2ce1d1,_0x2ba99b)['then'](function(_0x4cacfc){logger[_0x3f64('0xb')]('ChatProactiveAction,\x20%s,\x20%s',_0x1ecb67,_0x3f64('0xc'));logger[_0x3f64('0xd')](_0x3f64('0xe'),_0x1ecb67,_0x3f64('0xc'),JSON[_0x3f64('0xf')](_0x4cacfc));if(_0x4cacfc['error']){if(_0x4cacfc[_0x3f64('0x10')][_0x3f64('0x11')]===0x1f4){logger[_0x3f64('0x10')](_0x3f64('0x12'),_0x1ecb67,_0x4cacfc[_0x3f64('0x10')]['message']);return _0x5dec7c(_0x4cacfc['error']['message']);}logger['error']('ChatProactiveAction,\x20%s,\x20%s',_0x1ecb67,_0x4cacfc['error'][_0x3f64('0x13')]);return _0x29c7cc(_0x4cacfc[_0x3f64('0x10')][_0x3f64('0x13')]);}else{logger[_0x3f64('0xb')](_0x3f64('0x12'),_0x1ecb67,_0x3f64('0xc'));_0x29c7cc(_0x4cacfc['result'][_0x3f64('0x13')]);}})['catch'](function(_0x365575){logger[_0x3f64('0x10')]('ChatProactiveAction,\x20%s,\x20%s',_0x1ecb67,_0x365575);_0x5dec7c(_0x365575);});});}
\ No newline at end of file