Built motion from commit (unavailable).|2.5.21
[motion2.git] / server / api / whatsappApplication / whatsappApplication.rpc.js
index a1efff1..42f13ca 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6379=['lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','http','request','then','info','WhatsappApplication,\x20%s,\x20%s','request\x20sent','debug','WhatsappApplication,\x20%s,\x20%s,\x20%s','stringify','error','message','catch'];(function(_0x1e7c22,_0x485d2c){var _0x572ff7=function(_0x436cfe){while(--_0x436cfe){_0x1e7c22['push'](_0x1e7c22['shift']());}};_0x572ff7(++_0x485d2c);}(_0x6379,0x84));var _0x9637=function(_0x10371c,_0x4b83a2){_0x10371c=_0x10371c-0x0;var _0x57e601=_0x6379[_0x10371c];return _0x57e601;};'use strict';var _=require(_0x9637('0x0'));var util=require(_0x9637('0x1'));var moment=require(_0x9637('0x2'));var BPromise=require(_0x9637('0x3'));var rs=require(_0x9637('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x9637('0x5'))['db'];var utils=require(_0x9637('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x9637('0x7'));var jayson=require(_0x9637('0x8'));var client=jayson[_0x9637('0x9')][_0x9637('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xf0db9f,_0x5ce1a4,_0x515a84){return new BPromise(function(_0x21d91b,_0x42eda1){return client[_0x9637('0xb')](_0xf0db9f,_0x515a84)[_0x9637('0xc')](function(_0x5e66ee){logger[_0x9637('0xd')](_0x9637('0xe'),_0x5ce1a4,_0x9637('0xf'));logger[_0x9637('0x10')](_0x9637('0x11'),_0x5ce1a4,_0x9637('0xf'),JSON[_0x9637('0x12')](_0x5e66ee));if(_0x5e66ee[_0x9637('0x13')]){if(_0x5e66ee[_0x9637('0x13')]['code']===0x1f4){logger[_0x9637('0x13')]('WhatsappApplication,\x20%s,\x20%s',_0x5ce1a4,_0x5e66ee[_0x9637('0x13')][_0x9637('0x14')]);return _0x42eda1(_0x5e66ee['error'][_0x9637('0x14')]);}logger[_0x9637('0x13')](_0x9637('0xe'),_0x5ce1a4,_0x5e66ee[_0x9637('0x13')]['message']);return _0x21d91b(_0x5e66ee[_0x9637('0x13')][_0x9637('0x14')]);}else{logger[_0x9637('0xd')](_0x9637('0xe'),_0x5ce1a4,_0x9637('0xf'));_0x21d91b(_0x5e66ee['result'][_0x9637('0x14')]);}})[_0x9637('0x15')](function(_0x1eb774){logger[_0x9637('0x13')](_0x9637('0xe'),_0x5ce1a4,_0x1eb774);_0x42eda1(_0x1eb774);});});}
\ No newline at end of file
+var _0xf96b=['../../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','code','message','result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0x577d26,_0xa94287){var _0x41f8cd=function(_0x35442f){while(--_0x35442f){_0x577d26['push'](_0x577d26['shift']());}};_0x41f8cd(++_0xa94287);}(_0xf96b,0x109));var _0xbf96=function(_0x3b7f0c,_0x213d2b){_0x3b7f0c=_0x3b7f0c-0x0;var _0x2b0611=_0xf96b[_0x3b7f0c];return _0x2b0611;};'use strict';var _=require(_0xbf96('0x0'));var util=require(_0xbf96('0x1'));var moment=require(_0xbf96('0x2'));var BPromise=require(_0xbf96('0x3'));var rs=require(_0xbf96('0x4'));var fs=require('fs');var Redis=require(_0xbf96('0x5'));var db=require(_0xbf96('0x6'))['db'];var utils=require(_0xbf96('0x7'));var logger=require(_0xbf96('0x8'))(_0xbf96('0x9'));var config=require(_0xbf96('0xa'));var jayson=require(_0xbf96('0xb'));var client=jayson[_0xbf96('0xc')]['http']({'port':0x232a});function respondWithRpcPromise(_0x3e8271,_0x9270ca,_0x260da0){return new BPromise(function(_0x88b9fa,_0x56d77d){return client[_0xbf96('0xd')](_0x3e8271,_0x260da0)[_0xbf96('0xe')](function(_0x1ffe6b){logger[_0xbf96('0xf')](_0xbf96('0x10'),_0x9270ca,_0xbf96('0x11'));logger[_0xbf96('0x12')](_0xbf96('0x13'),_0x9270ca,'request\x20sent',JSON[_0xbf96('0x14')](_0x1ffe6b));if(_0x1ffe6b[_0xbf96('0x15')]){if(_0x1ffe6b['error'][_0xbf96('0x16')]===0x1f4){logger[_0xbf96('0x15')](_0xbf96('0x10'),_0x9270ca,_0x1ffe6b['error'][_0xbf96('0x17')]);return _0x56d77d(_0x1ffe6b[_0xbf96('0x15')][_0xbf96('0x17')]);}logger[_0xbf96('0x15')](_0xbf96('0x10'),_0x9270ca,_0x1ffe6b[_0xbf96('0x15')]['message']);return _0x88b9fa(_0x1ffe6b[_0xbf96('0x15')][_0xbf96('0x17')]);}else{logger[_0xbf96('0xf')](_0xbf96('0x10'),_0x9270ca,_0xbf96('0x11'));_0x88b9fa(_0x1ffe6b[_0xbf96('0x18')][_0xbf96('0x17')]);}})['catch'](function(_0x3296a7){logger['error'](_0xbf96('0x10'),_0x9270ca,_0x3296a7);_0x56d77d(_0x3296a7);});});}
\ No newline at end of file