Built motion from commit f861bcb808219e66da88ba48b61bddb35224a65e. Version 3.0.0...
[motion-next.git] / server / api / mailInteraction / mailInteraction.rpc.js
1 'use strict';const a493_0x130f=['UpdateMailInteraction','842797gXdPYo','./mailInteraction.socket','MailInteraction','omit','AddTagsToMailInteraction','stringify','info','@mysqldb','body','then','2114759yqKSjZ','attributes','where','options','@rediscache','ids','AddTags','rpc','134319pajzNM','error','616838jOZWWV','55761ZCrQjj','catch','message','addTags','71410KmQwWB','114QvBjDe','debug','5321qvNAMU','1DJyoQN','11NSFizZ'];const a493_0xabb0=function(_0x542918,_0x458df9){_0x542918=_0x542918-0x1d0;let _0x130f81=a493_0x130f[_0x542918];return _0x130f81;};const a493_0xb8122c=a493_0xabb0;(function(_0x3d4204,_0x1f6ff8){const _0xf2ed69=a493_0xabb0;while(!![]){try{const _0x48a5c2=-parseInt(_0xf2ed69(0x1eb))*-parseInt(_0xf2ed69(0x1e9))+-parseInt(_0xf2ed69(0x1e3))+parseInt(_0xf2ed69(0x1e1))*parseInt(_0xf2ed69(0x1ec))+parseInt(_0xf2ed69(0x1e8))*-parseInt(_0xf2ed69(0x1ed))+-parseInt(_0xf2ed69(0x1e4))+-parseInt(_0xf2ed69(0x1ef))+parseInt(_0xf2ed69(0x1d9));if(_0x48a5c2===_0x1f6ff8)break;else _0x3d4204['push'](_0x3d4204['shift']());}catch(_0x5bd8e3){_0x3d4204['push'](_0x3d4204['shift']());}}}(a493_0x130f,0x8770e));const _=require('lodash'),db=require(a493_0xb8122c(0x1d6))['db'],logger=require('@config/logger')(a493_0xb8122c(0x1e0)),{getSocket}=require(a493_0xb8122c(0x1dd)),socket=getSocket();require(a493_0xb8122c(0x1d0))['register'](socket),exports[a493_0xb8122c(0x1ee)]=function(_0x443a81){const _0x3503f6=this;return new Promise(function(_0x2ef23d,_0x2f0203){const _0x1f5aa9=a493_0xabb0;return db[_0x1f5aa9(0x1d1)]['update'](_0x443a81[_0x1f5aa9(0x1d7)],{'raw':_0x443a81['options']?_0x443a81[_0x1f5aa9(0x1dc)]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x443a81['options']?_0x443a81['options']['where']||null:null,'attributes':_0x443a81['options']?_0x443a81[_0x1f5aa9(0x1dc)][_0x1f5aa9(0x1da)]||null:null,'limit':_0x443a81['options']?_0x443a81[_0x1f5aa9(0x1dc)]['limit']||null:null})[_0x1f5aa9(0x1d8)](function(_0x1a42f4){const _0x572f13=_0x1f5aa9;logger[_0x572f13(0x1d5)](_0x572f13(0x1ee),_0x443a81),logger['debug'](_0x572f13(0x1ee),_0x443a81,JSON[_0x572f13(0x1d4)](_0x1a42f4)),_0x2ef23d(_0x1a42f4);})[_0x1f5aa9(0x1e5)](function(_0x5e5f0f){const _0x3e285c=_0x1f5aa9;logger[_0x3e285c(0x1e2)](_0x3e285c(0x1ee),_0x5e5f0f[_0x3e285c(0x1e6)],_0x443a81),_0x2f0203(_0x3503f6[_0x3e285c(0x1e2)](0x1f4,_0x5e5f0f[_0x3e285c(0x1e6)]));});});},exports[a493_0xb8122c(0x1d3)]=function(_0x5ebe20){const _0x229663=this;return new Promise(function(_0x5e8640,_0x1da01f){const _0x3cc967=a493_0xabb0;return db[_0x3cc967(0x1d1)]['findOne']({'where':_0x5ebe20[_0x3cc967(0x1dc)]?_0x5ebe20[_0x3cc967(0x1dc)][_0x3cc967(0x1db)]||null:null})['then'](function(_0x3587be){const _0x47c30c=_0x3cc967;if(_0x3587be)return _0x3587be[_0x47c30c(0x1e7)](_0x5ebe20[_0x47c30c(0x1d7)][_0x47c30c(0x1de)],{'through':_[_0x47c30c(0x1d2)](_0x5ebe20[_0x47c30c(0x1d7)],['ids','id'])});})[_0x3cc967(0x1d8)](function([_0x55c010]){const _0x63ae4d=_0x3cc967;logger['info'](_0x63ae4d(0x1df),_0x5ebe20),logger[_0x63ae4d(0x1ea)]('AddTags',_0x5ebe20,JSON[_0x63ae4d(0x1d4)](_0x55c010)),_0x5e8640(_0x55c010);})['catch'](function(_0x1515aa){const _0x12f48b=_0x3cc967;logger[_0x12f48b(0x1e2)](_0x12f48b(0x1df),_0x1515aa[_0x12f48b(0x1e6)],_0x5ebe20),_0x1da01f(_0x229663[_0x12f48b(0x1e2)](0x1f4,_0x1515aa[_0x12f48b(0x1e6)]));});});};