Built motion from commit 48095ee.|0.0.102
[motion.git] / server / config / routing / mail / index.js
index 6898e53..96f02c7 100644 (file)
@@ -1 +1 @@
-var _0x1eba=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x75\x74\x69\x6C","\x61\x73\x79\x6E\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x55\x73\x65\x72","\x2E\x2F\x73\x65\x73\x73\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x20\x52\x6F\x75\x74\x69\x6E\x67\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E","\x6C\x6F\x67","\x73\x74\x61\x74\x75\x73","\x52\x45\x43\x45\x49\x56\x45\x44","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x72\x6F\x6F\x6D\x69\x64","\x69\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x25\x73\x2E\x25\x73","\x75\x6E\x69\x78","\x66\x6F\x72\x6D\x61\x74","\x73\x75\x62\x6A\x65\x63\x74","\x61\x67\x65\x6E\x74\x73","\x6E\x61\x6D\x65","\x6D\x61\x70","\x67\x65\x74\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x61\x63\x63\x6F\x75\x6E\x74\x69\x64","\x61\x63\x63\x6F\x75\x6E\x74\x6E\x61\x6D\x65","\x61\x63\x63\x6F\x75\x6E\x74\x61\x64\x64\x72\x65\x73\x73","\x61\x64\x64\x72\x65\x73\x73","\x66\x69\x64\x65\x6C\x69\x74\x79","\x61\x70\x70\x74\x69\x6D\x65\x6F\x75\x74","\x71\x75\x65\x75\x65\x74\x69\x6D\x65\x6F\x75\x74","\x74\x69\x6D\x65\x6F\x75\x74","\x73\x74\x72\x61\x74\x65\x67\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x41\x53\x43","\x6F\x6E\x6C\x69\x6E\x65","\x6D\x61\x69\x6C\x50\x61\x75\x73\x65","\x67\x65\x74\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x63\x6C\x6F\x6E\x65\x44\x65\x65\x70","\x6C\x65\x6E\x67\x74\x68","\x70\x75\x73\x68","\x61\x70\x70","\x6A\x6F\x69\x6E\x41\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x71\x75\x65\x75\x65\x69\x64","\x71\x75\x65\x75\x65\x6E\x61\x6D\x65","\x71\x75\x65\x75\x65","\x61\x67\x65\x6E\x74","\x64\x61\x74\x61\x31","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x74\x69\x6D\x65\x73\x6C\x6F\x74","\x63\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x64\x61\x74\x61\x32","\x66\x72\x6F\x6D","\x66\x6F\x72\x45\x61\x63\x68","\x45\x6E\x64\x20\x6D\x61\x69\x6C\x20\x72\x6F\x75\x74\x69\x6E\x67\x2E\x2E","\x77\x61\x74\x65\x72\x66\x61\x6C\x6C","\x65\x72\x72","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2E\x2E","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x2E\x2E","\x67\x65\x74\x4D\x61\x69\x6C\x52\x6F\x6F\x6D"];_0x1eba[0];var _=require(_0x1eba[1]);var moment=require(_0x1eba[2]);var util=require(_0x1eba[3]);var async=require(_0x1eba[4]);var Util=require(_0x1eba[5]);var ReportMail=require(_0x1eba[7])[_0x1eba[6]];var ReportMailRoom=require(_0x1eba[7])[_0x1eba[8]];var ReportMailSession=require(_0x1eba[7])[_0x1eba[9]];var MailMessage=require(_0x1eba[7])[_0x1eba[10]];var MailQueue=require(_0x1eba[7])[_0x1eba[11]];var Interval=require(_0x1eba[7])[_0x1eba[12]];var User=require(_0x1eba[7])[_0x1eba[13]];var Session=require(_0x1eba[14]);module[_0x1eba[15]]=function(){console[_0x1eba[17]](_0x1eba[16]);MailMessage[_0x1eba[20]](function(_0xb4d1xe){if(_0xb4d1xe[_0x1eba[18]]===_0x1eba[19]){handleMessage(_0xb4d1xe)}})};function handleEntityNotFound(_0xb4d1xe){return function(_0xb4d1x10){if(!_0xb4d1x10){throw {message:_0xb4d1xe}};return _0xb4d1x10}}function handleMailRoom(_0xb4d1x12,_0xb4d1x13){return function(_0xb4d1x14){_0xb4d1x12[_0x1eba[21]]=_0xb4d1x14[_0x1eba[22]];_0xb4d1x12[_0x1eba[23]]=util[_0x1eba[26]](_0x1eba[24],moment()[_0x1eba[25]](),_0xb4d1x14[_0x1eba[22]]);_0xb4d1x12[_0x1eba[27]]=_0xb4d1x14[_0x1eba[27]];_0xb4d1x13[_0x1eba[28]]=_[_0x1eba[30]](_0xb4d1x14.Users,function(_0xb4d1x15){return {id:_0xb4d1x15[_0x1eba[22]],name:_0xb4d1x15[_0x1eba[29]]}});return _0xb4d1x14[_0x1eba[31]]()}}function handleMailAccount(_0xb4d1x12,_0xb4d1x13){return function(_0xb4d1x17){_0xb4d1x12[_0x1eba[32]]=_0xb4d1x17[_0x1eba[22]];_0xb4d1x12[_0x1eba[33]]=_0xb4d1x17[_0x1eba[29]];_0xb4d1x12[_0x1eba[34]]=_0xb4d1x17[_0x1eba[35]];_0xb4d1x13[_0x1eba[36]]=_0xb4d1x17[_0x1eba[36]];if(_0xb4d1x17[_0x1eba[36]]){_0xb4d1x13[_0x1eba[37]]=_0xb4d1x13[_0x1eba[38]]=_0xb4d1x17[_0x1eba[39]];_0xb4d1x13[_0x1eba[36]]=_0xb4d1x17[_0x1eba[39]];_0xb4d1x13[_0x1eba[40]]=_0x1eba[41]};return _0xb4d1x17[_0x1eba[45]]({order:_0x1eba[42],include:[{model:MailQueue,attributes:[_0x1eba[22],_0x1eba[29],_0x1eba[39],_0x1eba[40]],include:[{model:User,attributes:[_0x1eba[22],_0x1eba[29],_0x1eba[43],_0x1eba[44]]}]},{model:User,attributes:[_0x1eba[22],_0x1eba[29],_0x1eba[43],_0x1eba[44]]},{model:Interval,include:[{all:true}]}]})}}function handleApps(_0xb4d1x12,_0xb4d1x13){return function(_0xb4d1x19){var _0xb4d1x1a=[];if(_0xb4d1x13[_0x1eba[36]]){_0xb4d1x12[_0x1eba[38]]=_0xb4d1x13[_0x1eba[36]];_0xb4d1x12[_0x1eba[37]]=_0xb4d1x13[_0x1eba[36]];_0xb4d1x12[_0x1eba[28]]=_0xb4d1x13[_0x1eba[28]];_0xb4d1x12[_0x1eba[46]]=_0x1eba[36];_0xb4d1x12[_0x1eba[40]]=_0x1eba[41];var _0xb4d1x1b=_[_0x1eba[47]](_0xb4d1x12);if(_0xb4d1x1b[_0x1eba[28]][_0x1eba[48]]){_0xb4d1x1a[_0x1eba[49]](function(_0xb4d1x1c){ new Session(_0xb4d1x1b,_0xb4d1x1c)})}};_0xb4d1x19[_0x1eba[66]](function(_0xb4d1x1d,_0xb4d1x1e){var _0xb4d1x1b=_[_0x1eba[47]](_0xb4d1x12);_0xb4d1x1b[_0x1eba[37]]=_0xb4d1x1d[_0x1eba[39]];_0xb4d1x1b[_0x1eba[46]]=_0xb4d1x1d[_0x1eba[50]];_0xb4d1x1b[_0x1eba[51]]=moment()[_0x1eba[26]](_0x1eba[52]);switch(_0xb4d1x1d[_0x1eba[50]]){case _0x1eba[55]:_0xb4d1x1b[_0x1eba[53]]=_0xb4d1x1d[_0x1eba[11]][_0x1eba[22]];_0xb4d1x1b[_0x1eba[54]]=_0xb4d1x1d[_0x1eba[11]][_0x1eba[29]];_0xb4d1x1b[_0x1eba[40]]=_0xb4d1x1d[_0x1eba[11]][_0x1eba[40]];_0xb4d1x1b[_0x1eba[38]]=_0xb4d1x1d[_0x1eba[11]][_0x1eba[39]];_0xb4d1x1b[_0x1eba[28]]=_[_0x1eba[30]](_0xb4d1x1d[_0x1eba[11]].Users,function(_0xb4d1x1f){return {id:_0xb4d1x1f[_0x1eba[22]],name:_0xb4d1x1f[_0x1eba[29]]}});break;case _0x1eba[56]:_0xb4d1x1b[_0x1eba[38]]=_0xb4d1x1d[_0x1eba[39]];_0xb4d1x1b[_0x1eba[40]]=_0x1eba[41];_0xb4d1x1b[_0x1eba[28]]=[{id:_0xb4d1x1d[_0x1eba[13]][_0x1eba[22]],name:_0xb4d1x1d[_0x1eba[13]][_0x1eba[29]]}];break;default:};if(_0xb4d1x1a[_0x1eba[48]]){_0xb4d1x1a[_0x1eba[49]](function(_0xb4d1x20,_0xb4d1x1c){if(_0xb4d1x20){_0xb4d1x1c(null,_0xb4d1x20)}else {console[_0x1eba[17]](_0x1eba[57],_0xb4d1x1b);return ReportMailSession[_0x1eba[63]]({leaveAt:moment()[_0x1eba[26]](_0x1eba[52]),unmanaged:true},{where:{leaveAt:null,uniqueid:_0xb4d1x1b[_0x1eba[23]]}})[_0x1eba[60]](function(){return ReportMailSession[_0x1eba[62]]({uniqueid:_0xb4d1x1b[_0x1eba[23]],subject:_0xb4d1x1b[_0x1eba[27]],accountid:_0xb4d1x1b[_0x1eba[32]],accountname:_0xb4d1x1b[_0x1eba[33]],accountaddress:_0xb4d1x1b[_0x1eba[34]],application:_0xb4d1x1b[_0x1eba[46]],memberid:(_0xb4d1x1b[_0x1eba[46]]===_0x1eba[56]&&_0xb4d1x1b[_0x1eba[28]][0])?_0xb4d1x1b[_0x1eba[28]][0][_0x1eba[22]]:null,membername:(_0xb4d1x1b[_0x1eba[46]]===_0x1eba[56]&&_0xb4d1x1b[_0x1eba[28]][0])?_0xb4d1x1b[_0x1eba[28]][0][_0x1eba[29]]:null,queue:_0xb4d1x1b[_0x1eba[53]],queuename:_0xb4d1x1b[_0x1eba[54]],roomid:_0xb4d1x1b[_0x1eba[21]],fidelity:_0xb4d1x1b[_0x1eba[46]]===_0x1eba[36]?_0xb4d1x1b[_0x1eba[61]]:null,joinAt:moment()[_0x1eba[26]](_0x1eba[52])})})[_0x1eba[60]](function(){ new Session(_0xb4d1x1b,_0xb4d1x1c)})[_0x1eba[59]](function(_0xb4d1x21){console[_0x1eba[58]](_0xb4d1x21)})}})}else {_0xb4d1x1a[_0x1eba[49]](function(_0xb4d1x1c){console[_0x1eba[17]](_0x1eba[64],_0xb4d1x1b);return ReportMailRoom[_0x1eba[62]]({uniqueid:_0xb4d1x1b[_0x1eba[23]],subject:_0xb4d1x1b[_0x1eba[27]],accountid:_0xb4d1x1b[_0x1eba[32]],accountname:_0xb4d1x1b[_0x1eba[33]],accountaddress:_0xb4d1x1b[_0x1eba[34]],from:_0xb4d1x1b[_0x1eba[65]],roomid:_0xb4d1x1b[_0x1eba[21]],joinAt:moment()[_0x1eba[26]](_0x1eba[52])})[_0x1eba[60]](function(){return ReportMailSession[_0x1eba[62]]({uniqueid:_0xb4d1x1b[_0x1eba[23]],subject:_0xb4d1x1b[_0x1eba[27]],accountid:_0xb4d1x1b[_0x1eba[32]],accountname:_0xb4d1x1b[_0x1eba[33]],accountaddress:_0xb4d1x1b[_0x1eba[34]],application:_0xb4d1x1b[_0x1eba[46]],memberid:(_0xb4d1x1b[_0x1eba[46]]===_0x1eba[56]&&_0xb4d1x1b[_0x1eba[28]][0])?_0xb4d1x1b[_0x1eba[28]][0][_0x1eba[22]]:null,membername:(_0xb4d1x1b[_0x1eba[46]]===_0x1eba[56]&&_0xb4d1x1b[_0x1eba[28]][0])?_0xb4d1x1b[_0x1eba[28]][0][_0x1eba[29]]:null,queue:_0xb4d1x1b[_0x1eba[53]],queuename:_0xb4d1x1b[_0x1eba[54]],roomid:_0xb4d1x1b[_0x1eba[21]],fidelity:_0xb4d1x1b[_0x1eba[46]]===_0x1eba[36]?_0xb4d1x1b[_0x1eba[61]]:null,joinAt:moment()[_0x1eba[26]](_0x1eba[52])})})[_0x1eba[60]](function(){ new Session(_0xb4d1x1b,_0xb4d1x1c)})[_0x1eba[59]](function(_0xb4d1x21){console[_0x1eba[58]](_0xb4d1x21)})})}});async[_0x1eba[68]](_0xb4d1x1a,function(_0xb4d1x21,_0xb4d1x22){console[_0x1eba[17]](_0x1eba[67]);if(_0xb4d1x21){console[_0x1eba[58]](_0xb4d1x21)};if(!_0xb4d1x22){return ReportMailRoom[_0x1eba[63]]({leaveAt:moment()[_0x1eba[26]](_0x1eba[52]),unmanaged:true},{where:{leaveAt:null,uniqueid:_0xb4d1x12[_0x1eba[23]]},individualHooks:true})[_0x1eba[60]](function(){return ReportMailSession[_0x1eba[63]]({leaveAt:moment()[_0x1eba[26]](_0x1eba[52]),unmanaged:true},{where:{leaveAt:null,uniqueid:_0xb4d1x12[_0x1eba[23]]},individualHooks:true})})[_0x1eba[59]](function(_0xb4d1x21){console[_0x1eba[58]](_0xb4d1x21)})}})}}function handleMessage(_0xb4d1xe){var _0xb4d1x13={agents:[]};var _0xb4d1x12={messageid:_0xb4d1xe[_0x1eba[22]],from:_0xb4d1xe[_0x1eba[65]][0]||null,joinAt:moment()[_0x1eba[26]](_0x1eba[52])};return _0xb4d1xe[_0x1eba[72]]({include:[{model:User,attributes:[_0x1eba[22],_0x1eba[29],_0x1eba[43],_0x1eba[44]]}]})[_0x1eba[60]](handleEntityNotFound(_0x1eba[71]))[_0x1eba[60]](handleMailRoom(_0xb4d1x12,_0xb4d1x13))[_0x1eba[60]](handleEntityNotFound(_0x1eba[70]))[_0x1eba[60]](handleMailAccount(_0xb4d1x12,_0xb4d1x13))[_0x1eba[60]](handleApps(_0xb4d1x12,_0xb4d1x13))[_0x1eba[59]](function(_0xb4d1x21){console[_0x1eba[58]](_0x1eba[69],_0xb4d1x21)})}
\ No newline at end of file
+var _0xa382=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x75\x74\x69\x6C","\x61\x73\x79\x6E\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x55\x73\x65\x72","\x2E\x2F\x73\x65\x73\x73\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x20\x52\x6F\x75\x74\x69\x6E\x67\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E","\x6C\x6F\x67","\x72\x6F\x6F\x6D\x69\x64","\x69\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x25\x73\x2E\x25\x73","\x75\x6E\x69\x78","\x66\x6F\x72\x6D\x61\x74","\x73\x75\x62\x6A\x65\x63\x74","\x61\x67\x65\x6E\x74\x73","\x6E\x61\x6D\x65","\x6D\x61\x70","\x67\x65\x74\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x61\x63\x63\x6F\x75\x6E\x74\x69\x64","\x61\x63\x63\x6F\x75\x6E\x74\x6E\x61\x6D\x65","\x61\x63\x63\x6F\x75\x6E\x74\x61\x64\x64\x72\x65\x73\x73","\x61\x64\x64\x72\x65\x73\x73","\x66\x69\x64\x65\x6C\x69\x74\x79","\x61\x70\x70\x74\x69\x6D\x65\x6F\x75\x74","\x71\x75\x65\x75\x65\x74\x69\x6D\x65\x6F\x75\x74","\x74\x69\x6D\x65\x6F\x75\x74","\x73\x74\x72\x61\x74\x65\x67\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x41\x53\x43","\x6F\x6E\x6C\x69\x6E\x65","\x6D\x61\x69\x6C\x50\x61\x75\x73\x65","\x67\x65\x74\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x63\x6C\x6F\x6E\x65\x44\x65\x65\x70","\x6C\x65\x6E\x67\x74\x68","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x61\x67\x65\x6E\x74","\x71\x75\x65\x75\x65\x69\x64","\x71\x75\x65\x75\x65\x6E\x61\x6D\x65","\x74\x69\x6D\x65\x73\x6C\x6F\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x63\x72\x65\x61\x74\x65","\x66\x72\x6F\x6D","\x70\x75\x73\x68","\x61\x70\x70","\x6A\x6F\x69\x6E\x41\x74","\x55\x73\x65\x72\x73","\x55\x73\x65\x72\x48\x61\x73\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x2E\x70\x65\x6E\x61\x6C\x74\x79","\x6F\x72\x64\x65\x72\x42\x79","\x70\x65\x6E\x61\x6C\x74\x79","\x55\x73\x65\x72\x48\x61\x73\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x71\x75\x65\x75\x65","\x75\x70\x64\x61\x74\x65","\x66\x6F\x72\x45\x61\x63\x68","\x45\x6E\x64\x20\x6D\x61\x69\x6C\x20\x72\x6F\x75\x74\x69\x6E\x67\x2E\x2E","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x66\x69\x6E\x64\x42\x79\x49\x64","\x77\x61\x74\x65\x72\x66\x61\x6C\x6C","\x65\x72\x72","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2E\x2E","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x2E\x2E","\x67\x65\x74\x4D\x61\x69\x6C\x52\x6F\x6F\x6D"];_0xa382[0];var _=require(_0xa382[1]);var moment=require(_0xa382[2]);var util=require(_0xa382[3]);var async=require(_0xa382[4]);var Util=require(_0xa382[5]);var ReportMail=require(_0xa382[7])[_0xa382[6]];var ReportMailRoom=require(_0xa382[7])[_0xa382[8]];var ReportMailSession=require(_0xa382[7])[_0xa382[9]];var MailMessage=require(_0xa382[7])[_0xa382[10]];var MailQueue=require(_0xa382[7])[_0xa382[11]];var MailRoom=require(_0xa382[7])[_0xa382[12]];var Interval=require(_0xa382[7])[_0xa382[13]];var User=require(_0xa382[7])[_0xa382[14]];var Session=require(_0xa382[15]);module[_0xa382[16]]=function(_0xb732xf){console[_0xa382[18]](_0xa382[17]);handleMessage(_0xb732xf)};function handleEntityNotFound(_0xb732xf){return function(_0xb732x11){if(!_0xb732x11){throw {message:_0xb732xf}};return _0xb732x11}}function handleMailRoom(_0xb732x13,_0xb732x14){return function(_0xb732x15){_0xb732x13[_0xa382[19]]=_0xb732x15[_0xa382[20]];_0xb732x13[_0xa382[21]]=util[_0xa382[24]](_0xa382[22],moment()[_0xa382[23]](),_0xb732x15[_0xa382[20]]);_0xb732x13[_0xa382[25]]=_0xb732x15[_0xa382[25]];_0xb732x14[_0xa382[26]]=_[_0xa382[28]](_0xb732x15.Users,function(_0xb732x16){return {id:_0xb732x16[_0xa382[20]],name:_0xb732x16[_0xa382[27]],penalty:0}});return _0xb732x15[_0xa382[29]]()}}function handleMailAccount(_0xb732x13,_0xb732x14){return function(_0xb732x18){_0xb732x13[_0xa382[30]]=_0xb732x18[_0xa382[20]];_0xb732x13[_0xa382[31]]=_0xb732x18[_0xa382[27]];_0xb732x13[_0xa382[32]]=_0xb732x18[_0xa382[33]];_0xb732x14[_0xa382[34]]=_0xb732x18[_0xa382[34]];if(_0xb732x18[_0xa382[34]]){_0xb732x14[_0xa382[35]]=_0xb732x14[_0xa382[36]]=_0xb732x18[_0xa382[37]];_0xb732x14[_0xa382[34]]=_0xb732x18[_0xa382[37]];_0xb732x14[_0xa382[38]]=_0xa382[39]};return _0xb732x18[_0xa382[43]]({order:_0xa382[40],include:[{model:MailQueue,attributes:[_0xa382[20],_0xa382[27],_0xa382[37],_0xa382[38]],include:[{model:User,attributes:[_0xa382[20],_0xa382[27],_0xa382[41],_0xa382[42]]}]},{model:User,attributes:[_0xa382[20],_0xa382[27],_0xa382[41],_0xa382[42]]},{model:Interval,include:[{all:true}]}]})}}function handleApps(_0xb732x13,_0xb732x14){return function(_0xb732x1a){var _0xb732x1b=[];if(_0xb732x14[_0xa382[34]]){_0xb732x13[_0xa382[36]]=_0xb732x14[_0xa382[34]];_0xb732x13[_0xa382[35]]=_0xb732x14[_0xa382[34]];_0xb732x13[_0xa382[26]]=_0xb732x14[_0xa382[26]];_0xb732x13[_0xa382[44]]=_0xa382[34];_0xb732x13[_0xa382[38]]=_0xa382[39];var _0xb732x1c=_[_0xa382[45]](_0xb732x13);if(_0xb732x1c[_0xa382[26]][_0xa382[46]]){_0xb732x1b[_0xa382[57]](function(_0xb732x1d){return ReportMailRoom[_0xa382[55]]({uniqueid:_0xb732x1c[_0xa382[21]],subject:_0xb732x1c[_0xa382[25]],accountid:_0xb732x1c[_0xa382[30]],accountname:_0xb732x1c[_0xa382[31]],accountaddress:_0xb732x1c[_0xa382[32]],from:_0xb732x1c[_0xa382[56]],roomid:_0xb732x1c[_0xa382[19]],joinAt:moment()[_0xa382[24]](_0xa382[54])})[_0xa382[49]](function(){return ReportMailSession[_0xa382[55]]({uniqueid:_0xb732x1c[_0xa382[21]],subject:_0xb732x1c[_0xa382[25]],accountid:_0xb732x1c[_0xa382[30]],accountname:_0xb732x1c[_0xa382[31]],accountaddress:_0xb732x1c[_0xa382[32]],application:_0xb732x1c[_0xa382[44]],memberid:(_0xb732x1c[_0xa382[44]]===_0xa382[50]&&_0xb732x1c[_0xa382[26]][0])?_0xb732x1c[_0xa382[26]][0][_0xa382[20]]:null,membername:(_0xb732x1c[_0xa382[44]]===_0xa382[50]&&_0xb732x1c[_0xa382[26]][0])?_0xb732x1c[_0xa382[26]][0][_0xa382[27]]:null,queue:_0xb732x1c[_0xa382[51]],queuename:_0xb732x1c[_0xa382[52]],roomid:_0xb732x1c[_0xa382[19]],fidelity:_0xb732x1c[_0xa382[44]]===_0xa382[34]?_0xb732x1c[_0xa382[53]]:null,joinAt:moment()[_0xa382[24]](_0xa382[54])})})[_0xa382[49]](function(){ new Session(_0xb732x1c,_0xb732x1d)})[_0xa382[48]](function(_0xb732x1e){console[_0xa382[47]](_0xb732x1e)})})}};_0xb732x1a[_0xa382[67]](function(_0xb732x1f,_0xb732x20){var _0xb732x1c=_[_0xa382[45]](_0xb732x13);_0xb732x1c[_0xa382[35]]=_0xb732x1f[_0xa382[37]];_0xb732x1c[_0xa382[44]]=_0xb732x1f[_0xa382[58]];_0xb732x1c[_0xa382[59]]=moment()[_0xa382[24]](_0xa382[54]);switch(_0xb732x1f[_0xa382[58]]){case _0xa382[65]:_0xb732x1c[_0xa382[51]]=_0xb732x1f[_0xa382[11]][_0xa382[20]];_0xb732x1c[_0xa382[52]]=_0xb732x1f[_0xa382[11]][_0xa382[27]];_0xb732x1c[_0xa382[38]]=_0xb732x1f[_0xa382[11]][_0xa382[38]];_0xb732x1c[_0xa382[36]]=_0xb732x1f[_0xa382[11]][_0xa382[37]];_0xb732x1f[_0xa382[11]][_0xa382[60]]=_[_0xa382[62]](_0xb732x1f[_0xa382[11]].Users,_0xa382[61]);_0xb732x1c[_0xa382[26]]=_[_0xa382[28]](_0xb732x1f[_0xa382[11]].Users,function(_0xb732x21){return {id:_0xb732x21[_0xa382[20]],name:_0xb732x21[_0xa382[27]],penalty:_0xb732x21[_0xa382[64]][_0xa382[63]]}});break;case _0xa382[50]:_0xb732x1c[_0xa382[36]]=_0xb732x1f[_0xa382[37]];_0xb732x1c[_0xa382[38]]=_0xa382[39];_0xb732x1c[_0xa382[26]]=[{id:_0xb732x1f[_0xa382[14]][_0xa382[20]],name:_0xb732x1f[_0xa382[14]][_0xa382[27]],penalty:0}];break;default:};if(_0xb732x1b[_0xa382[46]]){_0xb732x1b[_0xa382[57]](function(_0xb732x22,_0xb732x1d){if(_0xb732x22){_0xb732x1d(null,_0xb732x22)}else {return ReportMailSession[_0xa382[66]]({leaveAt:moment()[_0xa382[24]](_0xa382[54]),unmanaged:true},{where:{leaveAt:null,uniqueid:_0xb732x1c[_0xa382[21]]},individualHooks:true})[_0xa382[49]](function(){return ReportMailSession[_0xa382[55]]({uniqueid:_0xb732x1c[_0xa382[21]],subject:_0xb732x1c[_0xa382[25]],accountid:_0xb732x1c[_0xa382[30]],accountname:_0xb732x1c[_0xa382[31]],accountaddress:_0xb732x1c[_0xa382[32]],application:_0xb732x1c[_0xa382[44]],memberid:(_0xb732x1c[_0xa382[44]]===_0xa382[50]&&_0xb732x1c[_0xa382[26]][0])?_0xb732x1c[_0xa382[26]][0][_0xa382[20]]:null,membername:(_0xb732x1c[_0xa382[44]]===_0xa382[50]&&_0xb732x1c[_0xa382[26]][0])?_0xb732x1c[_0xa382[26]][0][_0xa382[27]]:null,queue:_0xb732x1c[_0xa382[51]],queuename:_0xb732x1c[_0xa382[52]],roomid:_0xb732x1c[_0xa382[19]],fidelity:_0xb732x1c[_0xa382[44]]===_0xa382[34]?_0xb732x1c[_0xa382[53]]:null,joinAt:moment()[_0xa382[24]](_0xa382[54])})})[_0xa382[49]](function(){ new Session(_0xb732x1c,_0xb732x1d)})[_0xa382[48]](function(_0xb732x1e){console[_0xa382[47]](_0xb732x1e)})}})}else {_0xb732x1b[_0xa382[57]](function(_0xb732x1d){return ReportMailRoom[_0xa382[55]]({uniqueid:_0xb732x1c[_0xa382[21]],subject:_0xb732x1c[_0xa382[25]],accountid:_0xb732x1c[_0xa382[30]],accountname:_0xb732x1c[_0xa382[31]],accountaddress:_0xb732x1c[_0xa382[32]],from:_0xb732x1c[_0xa382[56]],roomid:_0xb732x1c[_0xa382[19]],joinAt:moment()[_0xa382[24]](_0xa382[54])})[_0xa382[49]](function(){return ReportMailSession[_0xa382[55]]({uniqueid:_0xb732x1c[_0xa382[21]],subject:_0xb732x1c[_0xa382[25]],accountid:_0xb732x1c[_0xa382[30]],accountname:_0xb732x1c[_0xa382[31]],accountaddress:_0xb732x1c[_0xa382[32]],application:_0xb732x1c[_0xa382[44]],memberid:(_0xb732x1c[_0xa382[44]]===_0xa382[50]&&_0xb732x1c[_0xa382[26]][0])?_0xb732x1c[_0xa382[26]][0][_0xa382[20]]:null,membername:(_0xb732x1c[_0xa382[44]]===_0xa382[50]&&_0xb732x1c[_0xa382[26]][0])?_0xb732x1c[_0xa382[26]][0][_0xa382[27]]:null,queue:_0xb732x1c[_0xa382[51]],queuename:_0xb732x1c[_0xa382[52]],roomid:_0xb732x1c[_0xa382[19]],fidelity:_0xb732x1c[_0xa382[44]]===_0xa382[34]?_0xb732x1c[_0xa382[53]]:null,joinAt:moment()[_0xa382[24]](_0xa382[54])})})[_0xa382[49]](function(){ new Session(_0xb732x1c,_0xb732x1d)})[_0xa382[48]](function(_0xb732x1e){console[_0xa382[47]](_0xb732x1e)})})}});async[_0xa382[71]](_0xb732x1b,function(_0xb732x1e,_0xb732x23){console[_0xa382[18]](_0xa382[68]);if(_0xb732x1e){console[_0xa382[47]](_0xb732x1e)};if(!_0xb732x23){return ReportMailRoom[_0xa382[66]]({leaveAt:moment()[_0xa382[24]](_0xa382[54]),unmanaged:true,status:_0xa382[69]},{where:{leaveAt:null,uniqueid:_0xb732x13[_0xa382[21]]},individualHooks:true})[_0xa382[49]](function(){return MailRoom[_0xa382[70]](_0xb732x13[_0xa382[19]])})[_0xa382[49]](function(_0xb732x24){if(_0xb732x24){return _0xb732x24[_0xa382[66]]({status:_0xa382[69]})}})[_0xa382[49]](function(){return ReportMailSession[_0xa382[66]]({leaveAt:moment()[_0xa382[24]](_0xa382[54]),unmanaged:true},{where:{leaveAt:null,uniqueid:_0xb732x13[_0xa382[21]]},individualHooks:true})})[_0xa382[48]](function(_0xb732x1e){console[_0xa382[47]](_0xb732x1e)})}})}}function handleMessage(_0xb732xf){var _0xb732x14={agents:[]};var _0xb732x13={messageid:_0xb732xf[_0xa382[20]],from:_0xb732xf[_0xa382[56]][0]||null,joinAt:moment()[_0xa382[24]](_0xa382[54])};return _0xb732xf[_0xa382[75]]({include:[{model:User,attributes:[_0xa382[20],_0xa382[27],_0xa382[41],_0xa382[42]]}]})[_0xa382[49]](handleEntityNotFound(_0xa382[74]))[_0xa382[49]](handleMailRoom(_0xb732x13,_0xb732x14))[_0xa382[49]](handleEntityNotFound(_0xa382[73]))[_0xa382[49]](handleMailAccount(_0xb732x13,_0xb732x14))[_0xa382[49]](handleApps(_0xb732x13,_0xb732x14))[_0xa382[48]](function(_0xb732x1e){console[_0xa382[47]](_0xa382[72],_0xb732x1e)})}
\ No newline at end of file