Built motion from commit 94df3a359.|1.0.33
[motion.git] / server / config / automations / mail.js
index 268f1bb..45f2a6e 100644 (file)
@@ -1 +1 @@
-var _0x3c9c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x6F\x74\x69\x6F\x6E","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x4D\x61\x69\x6C","\x69\x6E\x66\x6F","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x4D\x61\x69\x6C\x20\x65\x78\x65\x63","\x65\x72\x72\x6F\x72","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6D\x65\x73\x73\x61\x67\x65","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x53\x74\x61\x63\x6B\x3A","\x73\x74\x61\x63\x6B","\x63\x61\x74\x63\x68","\x69\x64","\x64\x61\x74\x61\x31","\x73\x74\x61\x74\x75\x73","\x61\x63\x74\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x41\x63\x74\x69\x6F\x6E\x73","\x74\x68\x65\x6E","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x70\x75\x73\x68","\x41\x6C\x6C","\x41\x6E\x79","\x6C\x65\x6E\x67\x74\x68","\x24\x61\x6E\x64","\x77\x68\x65\x72\x65","\x24\x6F\x72","\x66\x69\x6E\x64\x41\x6C\x6C","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x6C\x6C","\x73\x63\x6F\x70\x65","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x4D\x61\x69\x6C\x20\x73\x65\x74\x53\x74\x61\x74\x75\x73","\x75\x70\x64\x61\x74\x65","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x65\x71\x75\x61\x6C\x73","\x6E\x6F\x74\x5F\x65\x71\x75\x61\x6C\x73","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x68\x6F\x75\x72\x73","\x73\x75\x62\x74\x72\x61\x63\x74","\x67\x72\x65\x61\x74\x65\x72","\x67\x72\x65\x61\x74\x65\x72\x5F\x6F\x72\x5F\x65\x71\x75\x61\x6C","\x6C\x65\x73\x73","\x6C\x65\x73\x73\x5F\x6F\x72\x5F\x65\x71\x75\x61\x6C","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x4D\x61\x69\x6C","\x73\x65\x74\x20\x77\x69\x74\x68\x20\x74\x69\x6D\x65\x6F\x75\x74","\x74\x69\x6D\x65\x6F\x75\x74","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x65\x78\x70\x6F\x72\x74\x73","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x4D\x61\x69\x6C\x20\x73\x65\x72\x76\x69\x63\x65\x20\x73\x74\x61\x72\x74\x65\x64","\x63\x68\x61\x6E\x6E\x65\x6C","\x6D\x61\x69\x6C","\x63\x72\x65\x61\x74\x65\x64\x2C\x20\x74\x68\x65\x20\x73\x74\x61\x74\x75\x73\x20\x69\x73","\x64\x65\x62\x75\x67","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x64\x2C\x20\x74\x68\x65\x20\x73\x74\x61\x74\x75\x73\x20\x69\x73","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x4D\x61\x69\x6C\x20\x75\x6E\x73\x65\x74\x20","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x20\x64\x65\x6C\x65\x74\x65\x64","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x4D\x61\x69\x6C\x20\x69\x6E\x69\x74","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x4D\x61\x69\x6C\x20\x61\x72\x65"];_0x3c9c[0];var _=require(_0x3c9c[1]);var moment=require(_0x3c9c[2]);var logger=require(_0x3c9c[4])(_0x3c9c[3]);var Automation=require(_0x3c9c[6])[_0x3c9c[5]];var MailRoom=require(_0x3c9c[6])[_0x3c9c[7]];var activeMailAutomations={};function executeAutomation(_0x2630x8){logger[_0x3c9c[9]](_0x3c9c[8],_0x2630x8);var _0x2630x9;return Automation[_0x3c9c[35]](_0x3c9c[34])[_0x3c9c[33]](_0x2630x8)[_0x3c9c[23]](function(_0x2630xe){_0x2630x9= _0x2630xe;var _0x2630xf=[];var _0x2630x10=[];var _0x2630x11={where:{}};_0x2630xe[_0x3c9c[26]][_0x3c9c[21]](function(_0x2630x12){_0x2630x10[_0x3c9c[25]](getCondition(_0x2630x12[_0x3c9c[24]]))});_0x2630xe[_0x3c9c[27]][_0x3c9c[21]](function(_0x2630x12){_0x2630xf[_0x3c9c[25]](getCondition(_0x2630x12[_0x3c9c[24]]))});if(_0x2630x10[_0x3c9c[28]]){_0x2630x11[_0x3c9c[30]][_0x3c9c[29]]= _0x2630x10};if(_0x2630xf[_0x3c9c[28]]){_0x2630x11[_0x3c9c[30]][_0x3c9c[31]]= _0x2630xf};return MailRoom[_0x3c9c[32]](_0x2630x11)})[_0x3c9c[23]](function(_0x2630xb){_0x2630xb[_0x3c9c[21]](function(_0x2630xc){_0x2630x9[_0x3c9c[22]][_0x3c9c[21]](function(_0x2630xd){switch(_0x2630xd[_0x3c9c[20]]){case _0x3c9c[19]:setStatus(_0x2630xc[_0x3c9c[17]],_0x2630xd[_0x3c9c[18]]);break;default:}})})})[_0x3c9c[16]](function(_0x2630xa){logger[_0x3c9c[11]](_0x3c9c[10]);logger[_0x3c9c[11]](_0x3c9c[12],_0x2630xa[_0x3c9c[13]]);logger[_0x3c9c[11]](_0x3c9c[14],_0x2630xa[_0x3c9c[15]])})}function setStatus(_0x2630x14,_0x2630x15){return MailRoom[_0x3c9c[37]]({status:_0x2630x15},{where:{id:_0x2630x14}})[_0x3c9c[16]](function(_0x2630xa){logger[_0x3c9c[11]](_0x3c9c[36]);logger[_0x3c9c[11]](_0x3c9c[12],_0x2630xa[_0x3c9c[13]]);logger[_0x3c9c[11]](_0x3c9c[14],_0x2630xa[_0x3c9c[15]])})}function getCondition(_0x2630x12){var _0x2630x17={};switch(_0x2630x12[_0x3c9c[38]]){case _0x3c9c[19]:switch(_0x2630x12[_0x3c9c[42]]){case _0x3c9c[40]:_0x2630x17[_0x2630x12[_0x3c9c[38]]]= _0x2630x12[_0x3c9c[39]];break;case _0x3c9c[41]:_0x2630x17[_0x2630x12[_0x3c9c[38]]]= {$ne:_0x2630x12[_0x3c9c[39]]};break;default:};break;case _0x3c9c[51]:var _0x2630x18=moment()[_0x3c9c[46]](parseInt(_0x2630x12[_0x3c9c[39]],10),_0x3c9c[45])[_0x3c9c[44]](_0x3c9c[43]);switch(_0x2630x12[_0x3c9c[42]]){case _0x3c9c[47]:_0x2630x17[_0x2630x12[_0x3c9c[38]]]= {lt:_0x2630x18};break;case _0x3c9c[48]:_0x2630x17[_0x2630x12[_0x3c9c[38]]]= {$lte:_0x2630x18};break;case _0x3c9c[49]:_0x2630x17[_0x2630x12[_0x3c9c[38]]]= {$gt:_0x2630x18};break;case _0x3c9c[50]:_0x2630x17[_0x2630x12[_0x3c9c[38]]]= {$gte:_0x2630x18};break;default:};break;default:};return _0x2630x17}function createInterval(_0x2630xe){logger[_0x3c9c[9]](_0x3c9c[52],_0x2630xe[_0x3c9c[17]],_0x3c9c[53],_0x2630xe[_0x3c9c[54]]* 60* 1000);activeMailAutomations[_0x3c9c[55]+ _0x2630xe[_0x3c9c[17]]]= setInterval(function(){executeAutomation(_0x2630xe[_0x3c9c[17]])},_0x2630xe[_0x3c9c[54]]* 60* 1000)}module[_0x3c9c[56]]= function(){logger[_0x3c9c[9]](_0x3c9c[57]);Automation[_0x3c9c[62]](function(_0x2630x1a,_0x2630x1b){if(_0x2630x1a[_0x3c9c[58]]=== _0x3c9c[59]){logger[_0x3c9c[61]](_0x3c9c[52],_0x2630x1a[_0x3c9c[17]],_0x3c9c[60],_0x2630x1a[_0x3c9c[19]]);if(_0x2630x1a[_0x3c9c[19]]){createInterval(_0x2630x1a)}}});Automation[_0x3c9c[65]](function(_0x2630x1a,_0x2630x1b){if(_0x2630x1a[_0x3c9c[58]]=== _0x3c9c[59]){logger[_0x3c9c[61]](_0x3c9c[52],_0x2630x1a[_0x3c9c[17]],_0x3c9c[63],_0x2630x1a[_0x3c9c[19]]);if(activeMailAutomations[_0x3c9c[55]+ _0x2630x1a[_0x3c9c[17]]]){logger[_0x3c9c[61]](_0x3c9c[64],_0x2630x1a[_0x3c9c[17]]);clearInterval(activeMailAutomations[_0x3c9c[55]+ _0x2630x1a[_0x3c9c[17]]]);delete activeMailAutomations[_0x3c9c[55]+ _0x2630x1a[_0x3c9c[17]]]};if(_0x2630x1a[_0x3c9c[19]]){createInterval(_0x2630x1a)}}});Automation[_0x3c9c[67]](function(_0x2630x1a,_0x2630x1b){if(_0x2630x1a[_0x3c9c[58]]=== _0x3c9c[59]){logger[_0x3c9c[61]](_0x3c9c[52],_0x2630x1a[_0x3c9c[17]],_0x3c9c[66]);if(activeMailAutomations[_0x3c9c[55]+ _0x2630x1a[_0x3c9c[17]]]){logger[_0x3c9c[61]](_0x3c9c[64],_0x2630x1a[_0x3c9c[17]]);clearInterval(activeMailAutomations[_0x3c9c[55]+ _0x2630x1a[_0x3c9c[17]]]);delete activeMailAutomations[_0x3c9c[55]+ _0x2630x1a[_0x3c9c[17]]]}}});return Automation[_0x3c9c[35]](_0x3c9c[34])[_0x3c9c[32]]({where:{status:true,channel:_0x3c9c[59]},attributes:[_0x3c9c[17],_0x3c9c[54]]})[_0x3c9c[23]](function(_0x2630x1c){logger[_0x3c9c[61]](_0x3c9c[69],_0x2630x1c[_0x3c9c[28]]);_0x2630x1c[_0x3c9c[21]](function(_0x2630xe){createInterval(_0x2630xe)})})[_0x3c9c[16]](function(_0x2630xa){logger[_0x3c9c[11]](_0x3c9c[68]);logger[_0x3c9c[11]](_0x3c9c[12],_0x2630xa[_0x3c9c[13]]);logger[_0x3c9c[11]](_0x3c9c[14],_0x2630xa[_0x3c9c[15]])})}
\ No newline at end of file
+var _0x8d23=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x6F\x74\x69\x6F\x6E","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x4D\x61\x69\x6C","\x69\x6E\x66\x6F","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x4D\x61\x69\x6C\x20\x65\x78\x65\x63","\x65\x72\x72\x6F\x72","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6D\x65\x73\x73\x61\x67\x65","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x53\x74\x61\x63\x6B\x3A","\x73\x74\x61\x63\x6B","\x63\x61\x74\x63\x68","\x69\x64","\x64\x61\x74\x61\x31","\x73\x74\x61\x74\x75\x73","\x61\x63\x74\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x41\x63\x74\x69\x6F\x6E\x73","\x74\x68\x65\x6E","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x70\x75\x73\x68","\x41\x6C\x6C","\x41\x6E\x79","\x6C\x65\x6E\x67\x74\x68","\x24\x61\x6E\x64","\x77\x68\x65\x72\x65","\x24\x6F\x72","\x66\x69\x6E\x64\x41\x6C\x6C","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x6C\x6C","\x73\x63\x6F\x70\x65","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x4D\x61\x69\x6C\x20\x73\x65\x74\x53\x74\x61\x74\x75\x73","\x75\x70\x64\x61\x74\x65","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x65\x71\x75\x61\x6C\x73","\x6E\x6F\x74\x5F\x65\x71\x75\x61\x6C\x73","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x68\x6F\x75\x72\x73","\x73\x75\x62\x74\x72\x61\x63\x74","\x67\x72\x65\x61\x74\x65\x72","\x67\x72\x65\x61\x74\x65\x72\x5F\x6F\x72\x5F\x65\x71\x75\x61\x6C","\x6C\x65\x73\x73","\x6C\x65\x73\x73\x5F\x6F\x72\x5F\x65\x71\x75\x61\x6C","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x4D\x61\x69\x6C","\x73\x65\x74\x20\x77\x69\x74\x68\x20\x74\x69\x6D\x65\x6F\x75\x74","\x74\x69\x6D\x65\x6F\x75\x74","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x65\x78\x70\x6F\x72\x74\x73","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x4D\x61\x69\x6C\x20\x73\x65\x72\x76\x69\x63\x65\x20\x73\x74\x61\x72\x74\x65\x64","\x63\x68\x61\x6E\x6E\x65\x6C","\x6D\x61\x69\x6C","\x63\x72\x65\x61\x74\x65\x64\x2C\x20\x74\x68\x65\x20\x73\x74\x61\x74\x75\x73\x20\x69\x73","\x64\x65\x62\x75\x67","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x64\x2C\x20\x74\x68\x65\x20\x73\x74\x61\x74\x75\x73\x20\x69\x73","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x4D\x61\x69\x6C\x20\x75\x6E\x73\x65\x74\x20","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x20\x64\x65\x6C\x65\x74\x65\x64","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x4D\x61\x69\x6C\x20\x69\x6E\x69\x74","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x4D\x61\x69\x6C\x20\x61\x72\x65"];_0x8d23[0];var _=require(_0x8d23[1]);var moment=require(_0x8d23[2]);var logger=require(_0x8d23[4])(_0x8d23[3]);var Automation=require(_0x8d23[6])[_0x8d23[5]];var MailRoom=require(_0x8d23[6])[_0x8d23[7]];var activeMailAutomations={};function executeAutomation(_0x61f2x8){logger[_0x8d23[9]](_0x8d23[8],_0x61f2x8);var _0x61f2x9;return Automation[_0x8d23[35]](_0x8d23[34])[_0x8d23[33]](_0x61f2x8)[_0x8d23[23]](function(_0x61f2xe){_0x61f2x9= _0x61f2xe;var _0x61f2xf=[];var _0x61f2x10=[];var _0x61f2x11={where:{}};_0x61f2xe[_0x8d23[26]][_0x8d23[21]](function(_0x61f2x12){_0x61f2x10[_0x8d23[25]](getCondition(_0x61f2x12[_0x8d23[24]]))});_0x61f2xe[_0x8d23[27]][_0x8d23[21]](function(_0x61f2x12){_0x61f2xf[_0x8d23[25]](getCondition(_0x61f2x12[_0x8d23[24]]))});if(_0x61f2x10[_0x8d23[28]]){_0x61f2x11[_0x8d23[30]][_0x8d23[29]]= _0x61f2x10};if(_0x61f2xf[_0x8d23[28]]){_0x61f2x11[_0x8d23[30]][_0x8d23[31]]= _0x61f2xf};return MailRoom[_0x8d23[32]](_0x61f2x11)})[_0x8d23[23]](function(_0x61f2xb){_0x61f2xb[_0x8d23[21]](function(_0x61f2xc){_0x61f2x9[_0x8d23[22]][_0x8d23[21]](function(_0x61f2xd){switch(_0x61f2xd[_0x8d23[20]]){case _0x8d23[19]:setStatus(_0x61f2xc[_0x8d23[17]],_0x61f2xd[_0x8d23[18]]);break;default:}})})})[_0x8d23[16]](function(_0x61f2xa){logger[_0x8d23[11]](_0x8d23[10]);logger[_0x8d23[11]](_0x8d23[12],_0x61f2xa[_0x8d23[13]]);logger[_0x8d23[11]](_0x8d23[14],_0x61f2xa[_0x8d23[15]])})}function setStatus(_0x61f2x14,_0x61f2x15){return MailRoom[_0x8d23[37]]({status:_0x61f2x15},{where:{id:_0x61f2x14}})[_0x8d23[16]](function(_0x61f2xa){logger[_0x8d23[11]](_0x8d23[36]);logger[_0x8d23[11]](_0x8d23[12],_0x61f2xa[_0x8d23[13]]);logger[_0x8d23[11]](_0x8d23[14],_0x61f2xa[_0x8d23[15]])})}function getCondition(_0x61f2x12){var _0x61f2x17={};switch(_0x61f2x12[_0x8d23[38]]){case _0x8d23[19]:switch(_0x61f2x12[_0x8d23[42]]){case _0x8d23[40]:_0x61f2x17[_0x61f2x12[_0x8d23[38]]]= _0x61f2x12[_0x8d23[39]];break;case _0x8d23[41]:_0x61f2x17[_0x61f2x12[_0x8d23[38]]]= {$ne:_0x61f2x12[_0x8d23[39]]};break;default:};break;case _0x8d23[51]:var _0x61f2x18=moment()[_0x8d23[46]](parseInt(_0x61f2x12[_0x8d23[39]],10),_0x8d23[45])[_0x8d23[44]](_0x8d23[43]);switch(_0x61f2x12[_0x8d23[42]]){case _0x8d23[47]:_0x61f2x17[_0x61f2x12[_0x8d23[38]]]= {lt:_0x61f2x18};break;case _0x8d23[48]:_0x61f2x17[_0x61f2x12[_0x8d23[38]]]= {$lte:_0x61f2x18};break;case _0x8d23[49]:_0x61f2x17[_0x61f2x12[_0x8d23[38]]]= {$gt:_0x61f2x18};break;case _0x8d23[50]:_0x61f2x17[_0x61f2x12[_0x8d23[38]]]= {$gte:_0x61f2x18};break;default:};break;default:};return _0x61f2x17}function createInterval(_0x61f2xe){logger[_0x8d23[9]](_0x8d23[52],_0x61f2xe[_0x8d23[17]],_0x8d23[53],_0x61f2xe[_0x8d23[54]]* 60* 1000);activeMailAutomations[_0x8d23[55]+ _0x61f2xe[_0x8d23[17]]]= setInterval(function(){executeAutomation(_0x61f2xe[_0x8d23[17]])},_0x61f2xe[_0x8d23[54]]* 60* 1000)}module[_0x8d23[56]]= function(){logger[_0x8d23[9]](_0x8d23[57]);Automation[_0x8d23[62]](function(_0x61f2x1a,_0x61f2x1b){if(_0x61f2x1a[_0x8d23[58]]=== _0x8d23[59]){logger[_0x8d23[61]](_0x8d23[52],_0x61f2x1a[_0x8d23[17]],_0x8d23[60],_0x61f2x1a[_0x8d23[19]]);if(_0x61f2x1a[_0x8d23[19]]){createInterval(_0x61f2x1a)}}});Automation[_0x8d23[65]](function(_0x61f2x1a,_0x61f2x1b){if(_0x61f2x1a[_0x8d23[58]]=== _0x8d23[59]){logger[_0x8d23[61]](_0x8d23[52],_0x61f2x1a[_0x8d23[17]],_0x8d23[63],_0x61f2x1a[_0x8d23[19]]);if(activeMailAutomations[_0x8d23[55]+ _0x61f2x1a[_0x8d23[17]]]){logger[_0x8d23[61]](_0x8d23[64],_0x61f2x1a[_0x8d23[17]]);clearInterval(activeMailAutomations[_0x8d23[55]+ _0x61f2x1a[_0x8d23[17]]]);delete activeMailAutomations[_0x8d23[55]+ _0x61f2x1a[_0x8d23[17]]]};if(_0x61f2x1a[_0x8d23[19]]){createInterval(_0x61f2x1a)}}});Automation[_0x8d23[67]](function(_0x61f2x1a,_0x61f2x1b){if(_0x61f2x1a[_0x8d23[58]]=== _0x8d23[59]){logger[_0x8d23[61]](_0x8d23[52],_0x61f2x1a[_0x8d23[17]],_0x8d23[66]);if(activeMailAutomations[_0x8d23[55]+ _0x61f2x1a[_0x8d23[17]]]){logger[_0x8d23[61]](_0x8d23[64],_0x61f2x1a[_0x8d23[17]]);clearInterval(activeMailAutomations[_0x8d23[55]+ _0x61f2x1a[_0x8d23[17]]]);delete activeMailAutomations[_0x8d23[55]+ _0x61f2x1a[_0x8d23[17]]]}}});return Automation[_0x8d23[35]](_0x8d23[34])[_0x8d23[32]]({where:{status:true,channel:_0x8d23[59]},attributes:[_0x8d23[17],_0x8d23[54]]})[_0x8d23[23]](function(_0x61f2x1c){logger[_0x8d23[61]](_0x8d23[69],_0x61f2x1c[_0x8d23[28]]);_0x61f2x1c[_0x8d23[21]](function(_0x61f2xe){createInterval(_0x61f2xe)})})[_0x8d23[16]](function(_0x61f2xa){logger[_0x8d23[11]](_0x8d23[68]);logger[_0x8d23[11]](_0x8d23[12],_0x61f2xa[_0x8d23[13]]);logger[_0x8d23[11]](_0x8d23[14],_0x61f2xa[_0x8d23[15]])})}
\ No newline at end of file