Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / api / whatsappApplication / whatsappApplication.rpc.js
index 3baaff8..a5800ab 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9ab0=['debug','WhatsappApplication,\x20%s,\x20%s,\x20%s','error','WhatsappApplication,\x20%s,\x20%s','message','result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','client','http','request','then','info','request\x20sent'];(function(_0x5c351c,_0x2046d8){var _0x26f3b3=function(_0x47ac18){while(--_0x47ac18){_0x5c351c['push'](_0x5c351c['shift']());}};_0x26f3b3(++_0x2046d8);}(_0x9ab0,0x195));var _0x09ab=function(_0x5869d3,_0x6b785a){_0x5869d3=_0x5869d3-0x0;var _0x5c9275=_0x9ab0[_0x5869d3];return _0x5c9275;};'use strict';var _=require(_0x09ab('0x0'));var util=require(_0x09ab('0x1'));var moment=require(_0x09ab('0x2'));var BPromise=require(_0x09ab('0x3'));var rs=require(_0x09ab('0x4'));var fs=require('fs');var Redis=require(_0x09ab('0x5'));var db=require(_0x09ab('0x6'))['db'];var utils=require(_0x09ab('0x7'));var logger=require(_0x09ab('0x8'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x09ab('0x9')][_0x09ab('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x241bd1,_0x233f2a,_0x610663){return new BPromise(function(_0x464d64,_0x174a54){return client[_0x09ab('0xb')](_0x241bd1,_0x610663)[_0x09ab('0xc')](function(_0x58c23b){logger[_0x09ab('0xd')]('WhatsappApplication,\x20%s,\x20%s',_0x233f2a,_0x09ab('0xe'));logger[_0x09ab('0xf')](_0x09ab('0x10'),_0x233f2a,'request\x20sent',JSON['stringify'](_0x58c23b));if(_0x58c23b[_0x09ab('0x11')]){if(_0x58c23b[_0x09ab('0x11')]['code']===0x1f4){logger['error'](_0x09ab('0x12'),_0x233f2a,_0x58c23b[_0x09ab('0x11')][_0x09ab('0x13')]);return _0x174a54(_0x58c23b[_0x09ab('0x11')][_0x09ab('0x13')]);}logger[_0x09ab('0x11')](_0x09ab('0x12'),_0x233f2a,_0x58c23b[_0x09ab('0x11')][_0x09ab('0x13')]);return _0x464d64(_0x58c23b[_0x09ab('0x11')][_0x09ab('0x13')]);}else{logger[_0x09ab('0xd')]('WhatsappApplication,\x20%s,\x20%s',_0x233f2a,_0x09ab('0xe'));_0x464d64(_0x58c23b[_0x09ab('0x14')][_0x09ab('0x13')]);}})['catch'](function(_0x21db00){logger[_0x09ab('0x11')](_0x09ab('0x12'),_0x233f2a,_0x21db00);_0x174a54(_0x21db00);});});}
\ No newline at end of file
+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(_0x1df3d0,_0x422f2e){var _0x32f149=function(_0x936ab3){while(--_0x936ab3){_0x1df3d0['push'](_0x1df3d0['shift']());}};_0x32f149(++_0x422f2e);}(_0xf006,0x146));var _0x6f00=function(_0x359dc9,_0x505a10){_0x359dc9=_0x359dc9-0x0;var _0x1d884f=_0xf006[_0x359dc9];return _0x1d884f;};'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