Built motion from commit (unavailable).|2.5.3
[motion2.git] / server / api / whatsappApplication / whatsappApplication.rpc.js
index b12e3ce..e445138 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf006=['code','message','result','moment','bluebird','ioredis','../../config/utils','../../config/environment','jayson/promise','client','request','then','info','WhatsappApplication,\x20%s,\x20%s','request\x20sent','debug','WhatsappApplication,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x4dfac1,_0x481d05){var _0x345ce2=function(_0x419426){while(--_0x419426){_0x4dfac1['push'](_0x4dfac1['shift']());}};_0x345ce2(++_0x481d05);}(_0xf006,0x146));var _0x6f00=function(_0xba4981,_0x343b65){_0xba4981=_0xba4981-0x0;var _0x257868=_0xf006[_0xba4981];return _0x257868;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x6f00('0x0'));var BPromise=require(_0x6f00('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x6f00('0x2'));var db=require('../../mysqldb')['db'];var utils=require(_0x6f00('0x3'));var logger=require('../../config/logger')('rpc');var config=require(_0x6f00('0x4'));var jayson=require(_0x6f00('0x5'));var client=jayson[_0x6f00('0x6')]['http']({'port':0x232a});function respondWithRpcPromise(_0x3c29ff,_0x4f918f,_0x3875fb){return new BPromise(function(_0x3001b1,_0x185728){return client[_0x6f00('0x7')](_0x3c29ff,_0x3875fb)[_0x6f00('0x8')](function(_0x3001c6){logger[_0x6f00('0x9')](_0x6f00('0xa'),_0x4f918f,_0x6f00('0xb'));logger[_0x6f00('0xc')](_0x6f00('0xd'),_0x4f918f,_0x6f00('0xb'),JSON[_0x6f00('0xe')](_0x3001c6));if(_0x3001c6['error']){if(_0x3001c6[_0x6f00('0xf')][_0x6f00('0x10')]===0x1f4){logger[_0x6f00('0xf')](_0x6f00('0xa'),_0x4f918f,_0x3001c6[_0x6f00('0xf')]['message']);return _0x185728(_0x3001c6[_0x6f00('0xf')]['message']);}logger[_0x6f00('0xf')]('WhatsappApplication,\x20%s,\x20%s',_0x4f918f,_0x3001c6[_0x6f00('0xf')][_0x6f00('0x11')]);return _0x3001b1(_0x3001c6[_0x6f00('0xf')][_0x6f00('0x11')]);}else{logger[_0x6f00('0x9')](_0x6f00('0xa'),_0x4f918f,_0x6f00('0xb'));_0x3001b1(_0x3001c6[_0x6f00('0x12')][_0x6f00('0x11')]);}})['catch'](function(_0x14b15d){logger['error']('WhatsappApplication,\x20%s,\x20%s',_0x4f918f,_0x14b15d);_0x185728(_0x14b15d);});});}
\ No newline at end of file
+var _0x0e4b=['lodash','util','moment','randomstring','rpc','../../config/environment','client','http','request','then','info','WhatsappApplication,\x20%s,\x20%s','request\x20sent','debug','WhatsappApplication,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch'];(function(_0x4505ff,_0x279eac){var _0x589f3f=function(_0x4dc73f){while(--_0x4dc73f){_0x4505ff['push'](_0x4505ff['shift']());}};_0x589f3f(++_0x279eac);}(_0x0e4b,0xdc));var _0xb0e4=function(_0x294457,_0x4aa173){_0x294457=_0x294457-0x0;var _0x30ce79=_0x0e4b[_0x294457];return _0x30ce79;};'use strict';var _=require(_0xb0e4('0x0'));var util=require(_0xb0e4('0x1'));var moment=require(_0xb0e4('0x2'));var BPromise=require('bluebird');var rs=require(_0xb0e4('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xb0e4('0x4'));var config=require(_0xb0e4('0x5'));var jayson=require('jayson/promise');var client=jayson[_0xb0e4('0x6')][_0xb0e4('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x78e4ed,_0x3dff2f,_0x35aa64){return new BPromise(function(_0x57f45d,_0x5192f0){return client[_0xb0e4('0x8')](_0x78e4ed,_0x35aa64)[_0xb0e4('0x9')](function(_0x1d6452){logger[_0xb0e4('0xa')](_0xb0e4('0xb'),_0x3dff2f,_0xb0e4('0xc'));logger[_0xb0e4('0xd')](_0xb0e4('0xe'),_0x3dff2f,_0xb0e4('0xc'),JSON[_0xb0e4('0xf')](_0x1d6452));if(_0x1d6452[_0xb0e4('0x10')]){if(_0x1d6452[_0xb0e4('0x10')][_0xb0e4('0x11')]===0x1f4){logger[_0xb0e4('0x10')](_0xb0e4('0xb'),_0x3dff2f,_0x1d6452['error'][_0xb0e4('0x12')]);return _0x5192f0(_0x1d6452[_0xb0e4('0x10')]['message']);}logger[_0xb0e4('0x10')](_0xb0e4('0xb'),_0x3dff2f,_0x1d6452[_0xb0e4('0x10')][_0xb0e4('0x12')]);return _0x57f45d(_0x1d6452[_0xb0e4('0x10')]['message']);}else{logger['info'](_0xb0e4('0xb'),_0x3dff2f,_0xb0e4('0xc'));_0x57f45d(_0x1d6452['result'][_0xb0e4('0x12')]);}})[_0xb0e4('0x13')](function(_0xc12df2){logger[_0xb0e4('0x10')](_0xb0e4('0xb'),_0x3dff2f,_0xc12df2);_0x5192f0(_0xc12df2);});});}
\ No newline at end of file