Built motion from commit (unavailable).|2.5.3
[motion2.git] / server / api / whatsappApplication / whatsappApplication.rpc.js
index e445138..82be707 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-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
+var _0x04f9=['../../config/utils','../../config/logger','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','result','util','moment','bluebird','ioredis','../../mysqldb'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x04f9,0xb3));var _0x904f=function(_0x10e5c4,_0x4800f3){_0x10e5c4=_0x10e5c4-0x0;var _0x2b522a=_0x04f9[_0x10e5c4];return _0x2b522a;};'use strict';var _=require('lodash');var util=require(_0x904f('0x0'));var moment=require(_0x904f('0x1'));var BPromise=require(_0x904f('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x904f('0x3'));var db=require(_0x904f('0x4'))['db'];var utils=require(_0x904f('0x5'));var logger=require(_0x904f('0x6'))(_0x904f('0x7'));var config=require(_0x904f('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x904f('0x9')][_0x904f('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x175c38,_0x21dce4,_0x34cbd7){return new BPromise(function(_0x506239,_0xa90c3f){return client[_0x904f('0xb')](_0x175c38,_0x34cbd7)[_0x904f('0xc')](function(_0x4f8d32){logger[_0x904f('0xd')](_0x904f('0xe'),_0x21dce4,_0x904f('0xf'));logger[_0x904f('0x10')](_0x904f('0x11'),_0x21dce4,_0x904f('0xf'),JSON[_0x904f('0x12')](_0x4f8d32));if(_0x4f8d32[_0x904f('0x13')]){if(_0x4f8d32[_0x904f('0x13')][_0x904f('0x14')]===0x1f4){logger[_0x904f('0x13')](_0x904f('0xe'),_0x21dce4,_0x4f8d32[_0x904f('0x13')][_0x904f('0x15')]);return _0xa90c3f(_0x4f8d32[_0x904f('0x13')][_0x904f('0x15')]);}logger[_0x904f('0x13')](_0x904f('0xe'),_0x21dce4,_0x4f8d32[_0x904f('0x13')][_0x904f('0x15')]);return _0x506239(_0x4f8d32[_0x904f('0x13')][_0x904f('0x15')]);}else{logger[_0x904f('0xd')]('WhatsappApplication,\x20%s,\x20%s',_0x21dce4,'request\x20sent');_0x506239(_0x4f8d32[_0x904f('0x16')][_0x904f('0x15')]);}})['catch'](function(_0x58c4d6){logger['error'](_0x904f('0xe'),_0x21dce4,_0x58c4d6);_0xa90c3f(_0x58c4d6);});});}
\ No newline at end of file