Built motion from commit ab870f9e.|2.5.44
[motion2.git] / server / api / whatsappMessage / whatsappMessage.rpc.js
index 56e53db..85bab47 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5a1b=['catch','CreateWhatsappMessage','options','raw','debug','stringify','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./whatsappMessage.socket','register','then','info','WhatsappMessage,\x20%s,\x20%s','request\x20sent','WhatsappMessage,\x20%s,\x20%s,\x20%s','error','message','result'];(function(_0x301091,_0x312a2d){var _0x586444=function(_0x10ae2f){while(--_0x10ae2f){_0x301091['push'](_0x301091['shift']());}};_0x586444(++_0x312a2d);}(_0x5a1b,0x146));var _0xb5a1=function(_0x27bf3f,_0x3eba7c){_0x27bf3f=_0x27bf3f-0x0;var _0x2cee08=_0x5a1b[_0x27bf3f];return _0x2cee08;};'use strict';var _=require(_0xb5a1('0x0'));var util=require(_0xb5a1('0x1'));var moment=require(_0xb5a1('0x2'));var BPromise=require('bluebird');var rs=require(_0xb5a1('0x3'));var fs=require('fs');var Redis=require(_0xb5a1('0x4'));var db=require(_0xb5a1('0x5'))['db'];var utils=require(_0xb5a1('0x6'));var logger=require(_0xb5a1('0x7'))(_0xb5a1('0x8'));var config=require('../../config/environment');var jayson=require(_0xb5a1('0x9'));var client=jayson[_0xb5a1('0xa')][_0xb5a1('0xb')]({'port':0x232a});config[_0xb5a1('0xc')]=_[_0xb5a1('0xd')](config[_0xb5a1('0xc')],{'host':_0xb5a1('0xe'),'port':0x18eb});var socket=require(_0xb5a1('0xf'))(new Redis(config['redis']));require(_0xb5a1('0x10'))[_0xb5a1('0x11')](socket);function respondWithRpcPromise(_0x5c2956,_0x281c11,_0x3193ba){return new BPromise(function(_0x40bc73,_0x38338b){return client['request'](_0x5c2956,_0x3193ba)[_0xb5a1('0x12')](function(_0x54076b){logger[_0xb5a1('0x13')](_0xb5a1('0x14'),_0x281c11,_0xb5a1('0x15'));logger['debug'](_0xb5a1('0x16'),_0x281c11,_0xb5a1('0x15'),JSON['stringify'](_0x54076b));if(_0x54076b[_0xb5a1('0x17')]){if(_0x54076b['error']['code']===0x1f4){logger[_0xb5a1('0x17')](_0xb5a1('0x14'),_0x281c11,_0x54076b[_0xb5a1('0x17')][_0xb5a1('0x18')]);return _0x38338b(_0x54076b[_0xb5a1('0x17')][_0xb5a1('0x18')]);}logger[_0xb5a1('0x17')](_0xb5a1('0x14'),_0x281c11,_0x54076b[_0xb5a1('0x17')][_0xb5a1('0x18')]);return _0x40bc73(_0x54076b['error'][_0xb5a1('0x18')]);}else{logger[_0xb5a1('0x13')]('WhatsappMessage,\x20%s,\x20%s',_0x281c11,_0xb5a1('0x15'));_0x40bc73(_0x54076b[_0xb5a1('0x19')][_0xb5a1('0x18')]);}})[_0xb5a1('0x1a')](function(_0x46b117){logger[_0xb5a1('0x17')](_0xb5a1('0x14'),_0x281c11,_0x46b117);_0x38338b(_0x46b117);});});}exports[_0xb5a1('0x1b')]=function(_0x5c6b6c){var _0xd4a6d5=this;return new Promise(function(_0x1ef8ff,_0x32a129){return db['WhatsappMessage']['create'](_0x5c6b6c['body'],{'raw':_0x5c6b6c[_0xb5a1('0x1c')]?_0x5c6b6c[_0xb5a1('0x1c')][_0xb5a1('0x1d')]===undefined?!![]:![]:!![]})[_0xb5a1('0x12')](function(_0x1adb6e){logger['info'](_0xb5a1('0x1b'),_0x5c6b6c);logger[_0xb5a1('0x1e')](_0xb5a1('0x1b'),_0x5c6b6c,JSON[_0xb5a1('0x1f')](_0x1adb6e));_0x1ef8ff(_0x1adb6e);})[_0xb5a1('0x1a')](function(_0x486199){logger[_0xb5a1('0x17')](_0xb5a1('0x1b'),_0x486199[_0xb5a1('0x18')],_0x5c6b6c);_0x32a129(_0xd4a6d5[_0xb5a1('0x17')](0x1f4,_0x486199['message']));});});};
\ No newline at end of file
+var _0xfc4c=['defaults','localhost','./whatsappMessage.socket','register','request','then','info','WhatsappMessage,\x20%s,\x20%s','request\x20sent','WhatsappMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','CreateWhatsappMessage','WhatsappMessage','create','body','options','debug','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','redis'];(function(_0x1cd47d,_0x55bc75){var _0x29d52f=function(_0x37737a){while(--_0x37737a){_0x1cd47d['push'](_0x1cd47d['shift']());}};_0x29d52f(++_0x55bc75);}(_0xfc4c,0x151));var _0xcfc4=function(_0xc5fc35,_0x4ccb1d){_0xc5fc35=_0xc5fc35-0x0;var _0xdea0a4=_0xfc4c[_0xc5fc35];return _0xdea0a4;};'use strict';var _=require(_0xcfc4('0x0'));var util=require(_0xcfc4('0x1'));var moment=require(_0xcfc4('0x2'));var BPromise=require(_0xcfc4('0x3'));var rs=require(_0xcfc4('0x4'));var fs=require('fs');var Redis=require(_0xcfc4('0x5'));var db=require(_0xcfc4('0x6'))['db'];var utils=require(_0xcfc4('0x7'));var logger=require(_0xcfc4('0x8'))('rpc');var config=require(_0xcfc4('0x9'));var jayson=require(_0xcfc4('0xa'));var client=jayson[_0xcfc4('0xb')]['http']({'port':0x232a});config[_0xcfc4('0xc')]=_[_0xcfc4('0xd')](config['redis'],{'host':_0xcfc4('0xe'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xcfc4('0xc')]));require(_0xcfc4('0xf'))[_0xcfc4('0x10')](socket);function respondWithRpcPromise(_0x41921e,_0x4b39f1,_0x17384a){return new BPromise(function(_0x5789ce,_0x98c25e){return client[_0xcfc4('0x11')](_0x41921e,_0x17384a)[_0xcfc4('0x12')](function(_0x82e8a4){logger[_0xcfc4('0x13')](_0xcfc4('0x14'),_0x4b39f1,_0xcfc4('0x15'));logger['debug'](_0xcfc4('0x16'),_0x4b39f1,_0xcfc4('0x15'),JSON[_0xcfc4('0x17')](_0x82e8a4));if(_0x82e8a4[_0xcfc4('0x18')]){if(_0x82e8a4[_0xcfc4('0x18')][_0xcfc4('0x19')]===0x1f4){logger[_0xcfc4('0x18')](_0xcfc4('0x14'),_0x4b39f1,_0x82e8a4[_0xcfc4('0x18')][_0xcfc4('0x1a')]);return _0x98c25e(_0x82e8a4[_0xcfc4('0x18')][_0xcfc4('0x1a')]);}logger[_0xcfc4('0x18')](_0xcfc4('0x14'),_0x4b39f1,_0x82e8a4[_0xcfc4('0x18')][_0xcfc4('0x1a')]);return _0x5789ce(_0x82e8a4[_0xcfc4('0x18')][_0xcfc4('0x1a')]);}else{logger[_0xcfc4('0x13')](_0xcfc4('0x14'),_0x4b39f1,'request\x20sent');_0x5789ce(_0x82e8a4[_0xcfc4('0x1b')][_0xcfc4('0x1a')]);}})[_0xcfc4('0x1c')](function(_0x4b906d){logger[_0xcfc4('0x18')](_0xcfc4('0x14'),_0x4b39f1,_0x4b906d);_0x98c25e(_0x4b906d);});});}exports[_0xcfc4('0x1d')]=function(_0x2cd3e0){var _0x3a290d=this;return new Promise(function(_0x29ba60,_0x1afab5){return db[_0xcfc4('0x1e')][_0xcfc4('0x1f')](_0x2cd3e0[_0xcfc4('0x20')],{'raw':_0x2cd3e0[_0xcfc4('0x21')]?_0x2cd3e0['options']['raw']===undefined?!![]:![]:!![]})[_0xcfc4('0x12')](function(_0x446ae0){logger[_0xcfc4('0x13')](_0xcfc4('0x1d'),_0x2cd3e0);logger[_0xcfc4('0x22')](_0xcfc4('0x1d'),_0x2cd3e0,JSON[_0xcfc4('0x17')](_0x446ae0));_0x29ba60(_0x446ae0);})[_0xcfc4('0x1c')](function(_0x104539){logger[_0xcfc4('0x18')]('CreateWhatsappMessage',_0x104539[_0xcfc4('0x1a')],_0x2cd3e0);_0x1afab5(_0x3a290d[_0xcfc4('0x18')](0x1f4,_0x104539[_0xcfc4('0x1a')]));});});};
\ No newline at end of file