Built motion from commit f651e4b0a7312c0adceb5e57d6684a801a3aaf0d. Version 3.0.0...
[motion-next.git] / server / api / whatsappInteraction / whatsappInteraction.rpc.js
1 const a797_0x2763=['UpdateWhatsappInteraction','then','message','WhatsappInteraction','ids','lodash','error','info','../../rediscache','catch','stringify','omit','AddTagsToWhatsappInteraction','addTags','where','../../config/logger','options','../../mysqldb','raw','body','debug','AddTags','./whatsappInteraction.socket','rpc','limit','findOne','update'];(function(_0x234209,_0x276361){const _0x284538=function(_0x116037){while(--_0x116037){_0x234209['push'](_0x234209['shift']());}};_0x284538(++_0x276361);}(a797_0x2763,0x1b6));const a797_0x2845=function(_0x234209,_0x276361){_0x234209=_0x234209-0x0;let _0x284538=a797_0x2763[_0x234209];return _0x284538;};const _0x45aee1=a797_0x2845;'use strict';const _=require(_0x45aee1('0x1a')),db=require(_0x45aee1('0xb'))['db'],logger=require(_0x45aee1('0x9'))(_0x45aee1('0x11')),{getSocket}=require(_0x45aee1('0x2')),socket=getSocket();require(_0x45aee1('0x10'))['register'](socket),exports['UpdateWhatsappInteraction']=function(_0x116037){const _0x413ea0=this;return new Promise(function(_0xb07ee1,_0x1833e5){const _0x9b5db7=a797_0x2845;return db[_0x9b5db7('0x18')][_0x9b5db7('0x14')](_0x116037['body'],{'raw':_0x116037[_0x9b5db7('0xa')]?_0x116037[_0x9b5db7('0xa')][_0x9b5db7('0xc')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x116037['options']?_0x116037[_0x9b5db7('0xa')][_0x9b5db7('0x8')]||null:null,'attributes':_0x116037[_0x9b5db7('0xa')]?_0x116037[_0x9b5db7('0xa')]['attributes']||null:null,'limit':_0x116037[_0x9b5db7('0xa')]?_0x116037[_0x9b5db7('0xa')][_0x9b5db7('0x12')]||null:null})[_0x9b5db7('0x16')](function(_0x59e06b){const _0x41176e=_0x9b5db7;logger[_0x41176e('0x1')](_0x41176e('0x15'),_0x116037),logger[_0x41176e('0xe')]('UpdateWhatsappInteraction',_0x116037,JSON[_0x41176e('0x4')](_0x59e06b)),_0xb07ee1(_0x59e06b);})[_0x9b5db7('0x3')](function(_0x1024a9){const _0xbee17b=_0x9b5db7;logger['error'](_0xbee17b('0x15'),_0x1024a9[_0xbee17b('0x17')],_0x116037),_0x1833e5(_0x413ea0['error'](0x1f4,_0x1024a9[_0xbee17b('0x17')]));});});},exports[_0x45aee1('0x6')]=function(_0x48dd37){const _0x3daf8f=this;return new Promise(function(_0x8f5f08,_0x53593d){const _0x175a21=a797_0x2845;return db[_0x175a21('0x18')][_0x175a21('0x13')]({'where':_0x48dd37[_0x175a21('0xa')]?_0x48dd37[_0x175a21('0xa')]['where']||null:null})[_0x175a21('0x16')](function(_0x145611){const _0x277846=_0x175a21;if(_0x145611)return _0x145611[_0x277846('0x7')](_0x48dd37[_0x277846('0xd')][_0x277846('0x19')],{'through':_[_0x277846('0x5')](_0x48dd37['body'],[_0x277846('0x19'),'id'])});})['then'](function([_0x41caad]){const _0x4c9e2b=_0x175a21;logger[_0x4c9e2b('0x1')](_0x4c9e2b('0xf'),_0x48dd37),logger['debug'](_0x4c9e2b('0xf'),_0x48dd37,JSON[_0x4c9e2b('0x4')](_0x41caad)),_0x8f5f08(_0x41caad);})['catch'](function(_0x29ab5e){const _0x4aebdb=_0x175a21;logger['error']('AddTags',_0x29ab5e[_0x4aebdb('0x17')],_0x48dd37),_0x53593d(_0x3daf8f[_0x4aebdb('0x0')](0x1f4,_0x29ab5e[_0x4aebdb('0x17')]));});});};