Built motion from commit f67b3b02.|2.6.31
[motion2.git] / server / api / whatsappApplication / whatsappApplication.rpc.js
index ebfacc2..21bf212 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xed1f=['request','then','info','WhatsappApplication,\x20%s,\x20%s','debug','request\x20sent','stringify','code','error','message','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http'];(function(_0x5b23c8,_0x3eb212){var _0x823005=function(_0x3ee5d1){while(--_0x3ee5d1){_0x5b23c8['push'](_0x5b23c8['shift']());}};_0x823005(++_0x3eb212);}(_0xed1f,0x6a));var _0xfed1=function(_0x8a969d,_0x339d9f){_0x8a969d=_0x8a969d-0x0;var _0x1d8dc7=_0xed1f[_0x8a969d];return _0x1d8dc7;};'use strict';var _=require(_0xfed1('0x0'));var util=require(_0xfed1('0x1'));var moment=require(_0xfed1('0x2'));var BPromise=require(_0xfed1('0x3'));var rs=require(_0xfed1('0x4'));var fs=require('fs');var Redis=require(_0xfed1('0x5'));var db=require(_0xfed1('0x6'))['db'];var utils=require(_0xfed1('0x7'));var logger=require(_0xfed1('0x8'))(_0xfed1('0x9'));var config=require(_0xfed1('0xa'));var jayson=require(_0xfed1('0xb'));var client=jayson[_0xfed1('0xc')][_0xfed1('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x380e18,_0x612b38,_0x2a6082){return new BPromise(function(_0x2967ef,_0x568d48){return client[_0xfed1('0xe')](_0x380e18,_0x2a6082)[_0xfed1('0xf')](function(_0x48862d){logger[_0xfed1('0x10')](_0xfed1('0x11'),_0x612b38,'request\x20sent');logger[_0xfed1('0x12')]('WhatsappApplication,\x20%s,\x20%s,\x20%s',_0x612b38,_0xfed1('0x13'),JSON[_0xfed1('0x14')](_0x48862d));if(_0x48862d['error']){if(_0x48862d['error'][_0xfed1('0x15')]===0x1f4){logger[_0xfed1('0x16')]('WhatsappApplication,\x20%s,\x20%s',_0x612b38,_0x48862d[_0xfed1('0x16')]['message']);return _0x568d48(_0x48862d['error'][_0xfed1('0x17')]);}logger[_0xfed1('0x16')]('WhatsappApplication,\x20%s,\x20%s',_0x612b38,_0x48862d[_0xfed1('0x16')]['message']);return _0x2967ef(_0x48862d['error'][_0xfed1('0x17')]);}else{logger[_0xfed1('0x10')](_0xfed1('0x11'),_0x612b38,_0xfed1('0x13'));_0x2967ef(_0x48862d['result'][_0xfed1('0x17')]);}})['catch'](function(_0x36ff34){logger[_0xfed1('0x16')]('WhatsappApplication,\x20%s,\x20%s',_0x612b38,_0x36ff34);_0x568d48(_0x36ff34);});});}
\ No newline at end of file
+var _0x9a19=['catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','WhatsappApplication,\x20%s,\x20%s','request\x20sent','debug','WhatsappApplication,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result'];(function(_0xae282f,_0x2d9368){var _0x5f46d4=function(_0x4f703e){while(--_0x4f703e){_0xae282f['push'](_0xae282f['shift']());}};_0x5f46d4(++_0x2d9368);}(_0x9a19,0x114));var _0x99a1=function(_0x1d87fc,_0x1e5321){_0x1d87fc=_0x1d87fc-0x0;var _0x492b56=_0x9a19[_0x1d87fc];return _0x492b56;};'use strict';var _=require(_0x99a1('0x0'));var util=require(_0x99a1('0x1'));var moment=require(_0x99a1('0x2'));var BPromise=require('bluebird');var rs=require(_0x99a1('0x3'));var fs=require('fs');var Redis=require(_0x99a1('0x4'));var db=require(_0x99a1('0x5'))['db'];var utils=require(_0x99a1('0x6'));var logger=require(_0x99a1('0x7'))(_0x99a1('0x8'));var config=require(_0x99a1('0x9'));var jayson=require(_0x99a1('0xa'));var client=jayson[_0x99a1('0xb')][_0x99a1('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x65045d,_0x523b9e,_0x4d2a5c){return new BPromise(function(_0x5aa6c2,_0x56f50){return client[_0x99a1('0xd')](_0x65045d,_0x4d2a5c)['then'](function(_0x5874fc){logger[_0x99a1('0xe')](_0x99a1('0xf'),_0x523b9e,_0x99a1('0x10'));logger[_0x99a1('0x11')](_0x99a1('0x12'),_0x523b9e,'request\x20sent',JSON[_0x99a1('0x13')](_0x5874fc));if(_0x5874fc[_0x99a1('0x14')]){if(_0x5874fc[_0x99a1('0x14')][_0x99a1('0x15')]===0x1f4){logger[_0x99a1('0x14')](_0x99a1('0xf'),_0x523b9e,_0x5874fc[_0x99a1('0x14')][_0x99a1('0x16')]);return _0x56f50(_0x5874fc[_0x99a1('0x14')][_0x99a1('0x16')]);}logger[_0x99a1('0x14')](_0x99a1('0xf'),_0x523b9e,_0x5874fc[_0x99a1('0x14')][_0x99a1('0x16')]);return _0x5aa6c2(_0x5874fc[_0x99a1('0x14')]['message']);}else{logger[_0x99a1('0xe')](_0x99a1('0xf'),_0x523b9e,_0x99a1('0x10'));_0x5aa6c2(_0x5874fc[_0x99a1('0x17')][_0x99a1('0x16')]);}})[_0x99a1('0x18')](function(_0x1ca878){logger['error']('WhatsappApplication,\x20%s,\x20%s',_0x523b9e,_0x1ca878);_0x56f50(_0x1ca878);});});}
\ No newline at end of file