Built motion from commit 14c9826.|0.0.145
[motion.git] / server / api / mail_room / mail_room.controller.js
index b990667..ea72d43 100644 (file)
@@ -1 +1 @@
-var _0x2d87=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x43\x6F\x6E\x74\x61\x63\x74","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x61\x67\x65\x6E\x74","\x69\x64","\x75\x73\x65\x72","\x73\x63\x6F\x70\x65","\x72\x6F\x6C\x65","\x61\x67\x65\x6E\x74\x49\x6E\x64\x65\x78","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x65\x72\x72\x6F\x72","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x49\x64","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x72\x6F\x6C\x6C\x62\x61\x63\x6B","\x63\x6F\x6D\x6D\x69\x74","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x6A\x6F\x62\x49\x64","\x4D\x61\x69\x6C\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x61\x73\x73\x69\x67\x6E\x65\x64","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74\x73","\x73\x65\x74\x55\x73\x65\x72\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79"];_0x2d87[0];var _=require(_0x2d87[1]);var util=require(_0x2d87[2]);var Util=require(_0x2d87[3]);var sequelize=require(_0x2d87[5])[_0x2d87[4]];var User=require(_0x2d87[5])[_0x2d87[6]];var Agent=require(_0x2d87[5])[_0x2d87[6]];var Contact=require(_0x2d87[5])[_0x2d87[7]];var MailRoom=require(_0x2d87[5])[_0x2d87[8]];var MailMessage=require(_0x2d87[5])[_0x2d87[9]];var MailAccount=require(_0x2d87[5])[_0x2d87[10]];var MailAttachment=require(_0x2d87[5])[_0x2d87[11]];exports[_0x2d87[12]]=function(_0x4a2dxc,_0x4a2dxd,_0x4a2dxe){switch(_0x4a2dxc[_0x2d87[23]][_0x2d87[25]]){case _0x2d87[21]:return MailRoom[_0x2d87[24]](_0x2d87[20],{method:[_0x2d87[21],_0x4a2dxc[_0x2d87[23]][_0x2d87[22]]]})[_0x2d87[19]](Util[_0x2d87[18]](_0x4a2dxc[_0x2d87[17]]))[_0x2d87[16]](function(_0x4a2dx10){return _0x4a2dxd[_0x2d87[15]](200)[_0x2d87[14]](_0x4a2dx10)})[_0x2d87[13]](function(_0x4a2dxf){return handleError(_0x4a2dxd,_0x4a2dxf)});default:return MailRoom[_0x2d87[24]](_0x2d87[20])[_0x2d87[19]](Util[_0x2d87[18]](_0x4a2dxc[_0x2d87[17]]))[_0x2d87[16]](function(_0x4a2dx10){return _0x4a2dxd[_0x2d87[15]](200)[_0x2d87[14]](_0x4a2dx10)})[_0x2d87[13]](function(_0x4a2dxf){return handleError(_0x4a2dxd,_0x4a2dxf)})}};exports[_0x2d87[26]]=function(_0x4a2dxc,_0x4a2dxd,_0x4a2dxe){return MailRoom[_0x2d87[28]]({where:{UserId:_0x4a2dxc[_0x2d87[27]][_0x2d87[22]]},include:[{all:true}]})[_0x2d87[16]](function(_0x4a2dx11){return _0x4a2dxd[_0x2d87[15]](200)[_0x2d87[14]](_0x4a2dx11)})[_0x2d87[13]](function(_0x4a2dxf){return handleError(_0x4a2dxd,_0x4a2dxf)})};exports[_0x2d87[29]]=function(_0x4a2dxc,_0x4a2dxd,_0x4a2dxe){return MailRoom[_0x2d87[24]](_0x2d87[20])[_0x2d87[32]](_0x4a2dxc[_0x2d87[27]][_0x2d87[22]])[_0x2d87[16]](function(_0x4a2dx12){if(!_0x4a2dx12){return _0x4a2dxd[_0x2d87[31]](404)};return _0x4a2dxd[_0x2d87[14]](_0x4a2dx12)})[_0x2d87[13]](function(_0x4a2dxf){console[_0x2d87[30]](_0x4a2dxf);return handleError(_0x4a2dxd,_0x4a2dxf)})};exports[_0x2d87[33]]=function(_0x4a2dxc,_0x4a2dxd,_0x4a2dxe){return MailRoom[_0x2d87[32]](_0x4a2dxc[_0x2d87[27]][_0x2d87[22]])[_0x2d87[16]](function(_0x4a2dx12){if(!_0x4a2dx12){return _0x4a2dxd[_0x2d87[31]](404)};return _0x4a2dx12[_0x2d87[38]]({attributes:[_0x2d87[22],_0x2d87[34],_0x2d87[35],_0x2d87[36],_0x2d87[25],_0x2d87[37]]})})[_0x2d87[16]](function(_0x4a2dx13){return _0x4a2dxd[_0x2d87[14]](_0x4a2dx13)})[_0x2d87[13]](function(_0x4a2dxf){return handleError(_0x4a2dxd,_0x4a2dxf)})};exports[_0x2d87[39]]=function(_0x4a2dxc,_0x4a2dxd,_0x4a2dxe){return MailRoom[_0x2d87[39]](_0x4a2dxc[_0x2d87[40]])[_0x2d87[16]](function(_0x4a2dx12){return _0x4a2dxd[_0x2d87[15]](201)[_0x2d87[14]](_0x4a2dx12)})[_0x2d87[13]](function(_0x4a2dxf){return handleError(_0x4a2dxd,_0x4a2dxf)})};exports[_0x2d87[41]]=function(_0x4a2dxc,_0x4a2dxd,_0x4a2dxe){_0x4a2dxc[_0x2d87[40]][_0x2d87[42]]=_0x4a2dxc[_0x2d87[27]][_0x2d87[22]];_0x4a2dxc[_0x2d87[40]][_0x2d87[43]]=(_0x4a2dxc[_0x2d87[40]][_0x2d87[44]]&&_0x4a2dxc[_0x2d87[40]][_0x2d87[44]][_0x2d87[45]])?true:false;return sequelize[_0x2d87[48]]()[_0x2d87[16]](function(_0x4a2dx14){return MailMessage[_0x2d87[39]](_0x4a2dxc[_0x2d87[40]],{include:[{model:MailAttachment}],transaction:_0x4a2dx14,user:_0x4a2dxc[_0x2d87[23]]})[_0x2d87[16]](function(_0x4a2dx15){_0x4a2dx14[_0x2d87[47]]();return _0x4a2dxd[_0x2d87[15]](201)[_0x2d87[14]](_0x4a2dx15)})[_0x2d87[13]](function(_0x4a2dxf){console[_0x2d87[30]](_0x4a2dxf);_0x4a2dx14[_0x2d87[46]]();return handleError(_0x4a2dxd,_0x4a2dxf)})})};exports[_0x2d87[49]]=function(_0x4a2dxc,_0x4a2dxd,_0x4a2dxe){return MailRoom[_0x2d87[32]](_0x4a2dxc[_0x2d87[27]][_0x2d87[22]])[_0x2d87[16]](function(_0x4a2dx12){if(!_0x4a2dx12){return _0x4a2dxd[_0x2d87[31]](404)};if(_0x4a2dx12[_0x2d87[50]]){throw  new Error(_0x2d87[51])};var _0x4a2dx16=_[_0x2d87[52]](_0x4a2dx12,_0x4a2dxc[_0x2d87[40]]);return _0x4a2dx16[_0x2d87[53]]()})[_0x2d87[16]](function(_0x4a2dx12){return _0x4a2dxd[_0x2d87[15]](200)[_0x2d87[14]](_0x4a2dx12)})[_0x2d87[13]](function(_0x4a2dxf){return handleError(_0x4a2dxd,_0x4a2dxf)})};exports[_0x2d87[54]]=function(_0x4a2dxc,_0x4a2dxd,_0x4a2dxe){return MailRoom[_0x2d87[32]](_0x4a2dxc[_0x2d87[27]][_0x2d87[22]])[_0x2d87[16]](function(_0x4a2dx12){if(!_0x4a2dx12){return _0x4a2dxd[_0x2d87[31]](404)};return _0x4a2dx12[_0x2d87[56]](_0x4a2dxc[_0x2d87[40]][_0x2d87[55]],{individualHooks:true})})[_0x2d87[16]](function(){return _0x4a2dxd[_0x2d87[31]](200)})[_0x2d87[13]](function(_0x4a2dxf){return handleError(_0x4a2dxd,_0x4a2dxf)})};exports[_0x2d87[57]]=function(_0x4a2dxc,_0x4a2dxd,_0x4a2dxe){return MailRoom[_0x2d87[32]](_0x4a2dxc[_0x2d87[27]][_0x2d87[22]])[_0x2d87[16]](function(_0x4a2dx12){if(!_0x4a2dx12){return _0x4a2dxd[_0x2d87[31]](404)};return _0x4a2dx12[_0x2d87[57]]()})[_0x2d87[16]](function(){return _0x4a2dxd[_0x2d87[31]](204)})[_0x2d87[13]](function(_0x4a2dxf){return handleError(_0x4a2dxd,_0x4a2dxf)})};exports[_0x2d87[58]]=function(_0x4a2dxc,_0x4a2dxd){return MailRoom[_0x2d87[57]]({where:{id:_0x4a2dxc[_0x2d87[17]][_0x2d87[22]]},individualHooks:true})[_0x2d87[16]](function(){return _0x4a2dxd[_0x2d87[31]](200)})[_0x2d87[13]](function(_0x4a2dxf){return handleError(_0x4a2dxd,_0x4a2dxf)})};function handleError(_0x4a2dxd,_0x4a2dxf){return _0x4a2dxd[_0x2d87[15]](500)[_0x2d87[14]](_0x4a2dxf)}
\ No newline at end of file
+var _0x2646=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x68\x74\x6D\x6C\x2D\x74\x6F\x2D\x74\x65\x78\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x43\x6F\x6E\x74\x61\x63\x74","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x53\x74\x61\x74\x75\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x69\x64","\x6D\x61\x70","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x72\x6F\x6C\x65","\x70\x65\x6E\x64\x69\x6E\x67","\x6C\x6F\x67","\x50\x45\x4E\x44\x49\x4E\x47","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x6E\x65\x77","\x4E\x45\x57","\x6F\x70\x65\x6E","\x4F\x50\x45\x4E","\x63\x6C\x6F\x73\x65\x64","\x43\x4C\x4F\x53\x45\x44","\x69\x6E\x62\x6F\x78","\x65\x72\x72\x6F\x72","\x53\x45\x4C\x45\x43\x54\x20\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x2E\x60\x69\x64\x60\x2C\x20\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x2E\x60\x73\x75\x62\x6A\x65\x63\x74\x60\x2C\x20\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x2E\x60\x66\x72\x6F\x6D\x60\x2C\x20\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x2E\x60\x61\x63\x63\x6F\x75\x6E\x74\x60\x2C\x20\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x2E\x60\x73\x74\x61\x74\x75\x73\x60\x2C\x20\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x2E\x60\x6C\x61\x73\x74\x45\x76\x65\x6E\x74\x60\x2C\x20\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x2E\x60\x75\x70\x64\x61\x74\x65\x64\x41\x74\x60\x20\x46\x52\x4F\x4D\x20\x60\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x41\x53\x20\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x20\x4C\x45\x46\x54\x20\x4F\x55\x54\x45\x52\x20\x4A\x4F\x49\x4E\x20\x28\x60\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x41\x53\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x49\x4E\x4E\x45\x52\x20\x4A\x4F\x49\x4E\x20\x60\x75\x73\x65\x72\x73\x60\x20\x41\x53\x20\x60\x55\x73\x65\x72\x73\x60\x20\x4F\x4E\x20\x60\x55\x73\x65\x72\x73\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x55\x73\x65\x72\x49\x64\x60\x29\x20\x4F\x4E\x20\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x49\x64\x60\x20\x57\x48\x45\x52\x45\x20\x28\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x2E\x60\x64\x65\x6C\x65\x74\x65\x64\x41\x74\x60\x20\x49\x53\x20\x4E\x55\x4C\x4C\x20\x41\x4E\x44\x20\x28\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x2E\x60\x73\x74\x61\x74\x75\x73\x60\x20\x3D\x20\x3A\x73\x74\x61\x74\x75\x73\x20\x4F\x52\x20\x60\x55\x73\x65\x72\x73\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x3A\x69\x64\x29\x29","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x61\x67\x65\x6E\x74","\x53\x45\x4C\x45\x43\x54\x20\x60\x69\x64\x60\x2C\x20\x60\x73\x75\x62\x6A\x65\x63\x74\x60\x2C\x20\x60\x66\x72\x6F\x6D\x60\x2C\x20\x60\x61\x63\x63\x6F\x75\x6E\x74\x60\x2C\x20\x60\x73\x74\x61\x74\x75\x73\x60\x2C\x20\x60\x6C\x61\x73\x74\x45\x76\x65\x6E\x74\x60\x20\x2C\x60\x75\x70\x64\x61\x74\x65\x64\x41\x74\x60\x20\x46\x52\x4F\x4D\x20\x60\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x57\x48\x45\x52\x45\x20\x60\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x64\x65\x6C\x65\x74\x65\x64\x41\x74\x60\x20\x49\x53\x20\x4E\x55\x4C\x4C","\x61\x67\x65\x6E\x74\x49\x6E\x64\x65\x78","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x75\x70\x64\x61\x74\x65\x52\x6F\x6F\x6D\x53\x74\x61\x74\x75\x73","\x62\x6F\x64\x79","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x2C","\x73\x70\x6C\x69\x74","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x4D\x65\x73\x73\x61\x67\x65","\x65\x6D\x61\x69\x6C","\x67\x65\x74\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x73\x68\x6F\x77","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x55\x73\x65\x72\x49\x64","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x49\x64","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x74\x65\x78\x74","\x68\x74\x6D\x6C","\x66\x72\x6F\x6D\x53\x74\x72\x69\x6E\x67","\x61\x63\x63\x6F\x75\x6E\x74\x49\x64","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x75\x70\x64\x61\x74\x65\x50\x61\x74\x63\x68","\x75\x70\x64\x61\x74\x65\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74\x73","\x73\x65\x74\x55\x73\x65\x72\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x2646[0];var _=require(_0x2646[1]);var util=require(_0x2646[2]);var htmlToText=require(_0x2646[3]);var Util=require(_0x2646[4]);var moment=require(_0x2646[5]);var sequelize=require(_0x2646[7])[_0x2646[6]];var User=require(_0x2646[7])[_0x2646[8]];var Agent=require(_0x2646[7])[_0x2646[8]];var Contact=require(_0x2646[7])[_0x2646[9]];var Status=require(_0x2646[7])[_0x2646[10]];var MailRoom=require(_0x2646[7])[_0x2646[11]];var MailMessage=require(_0x2646[7])[_0x2646[12]];var MailAccount=require(_0x2646[7])[_0x2646[13]];var MailApplication=require(_0x2646[7])[_0x2646[14]];var MailQueue=require(_0x2646[7])[_0x2646[15]];var MailAttachment=require(_0x2646[7])[_0x2646[16]];exports[_0x2646[17]]= function(_0x4f1dx11,_0x4f1dx12,_0x4f1dx13){return MailRoom[_0x2646[26]](_0x2646[25])[_0x2646[24]](Util[_0x2646[23]](_0x4f1dx11[_0x2646[22]]))[_0x2646[21]](function(_0x4f1dx15){return _0x4f1dx12[_0x2646[20]](200)[_0x2646[19]](_0x4f1dx15)})[_0x2646[18]](function(_0x4f1dx14){return handleError(_0x4f1dx12,_0x4f1dx14)})};exports[_0x2646[27]]= function(_0x4f1dx11,_0x4f1dx12){return MailRoom[_0x2646[27]]()[_0x2646[21]](function(_0x4f1dx16){return _0x4f1dx12[_0x2646[20]](200)[_0x2646[19]](_0x4f1dx16)})[_0x2646[18]](function(_0x4f1dx14){return handleError(_0x4f1dx12,_0x4f1dx14)})};function getMailQueues(_0x4f1dx18){return function(){switch(_0x4f1dx18[_0x2646[33]]){case _0x2646[32]:return User[_0x2646[31]](_0x4f1dx18[_0x2646[28]],{attributes:[_0x2646[28]]})[_0x2646[21]](Util[_0x2646[30]]({},{attributes:[_0x2646[28]]}))[_0x2646[21]](function(_0x4f1dx19){return {include:{model:MailAccount,include:{model:MailApplication,include:{model:MailQueue,where:{id:_[_0x2646[29]](_0x4f1dx19,_0x2646[28])}}}}}});default:return {}}}}exports[_0x2646[34]]= function(_0x4f1dx11,_0x4f1dx12){return Promise[_0x2646[41]]([])[_0x2646[21]](getMailQueues(_0x4f1dx11[_0x2646[32]]))[_0x2646[21]](function(_0x4f1dx1b){return MailRoom[_0x2646[40]](_[_0x2646[39]](Util[_0x2646[23]](_0x4f1dx11[_0x2646[22]],{status:_0x2646[36],updatedAt:{$gte:moment()[_0x2646[38]](_0x2646[37])}}),_0x4f1dx1b))})[_0x2646[21]](function(_0x4f1dx1a){return _0x4f1dx12[_0x2646[20]](200)[_0x2646[19]]({value:_0x4f1dx1a})})[_0x2646[18]](function(_0x4f1dx14){console[_0x2646[35]](_0x4f1dx14);return handleError(_0x4f1dx12,_0x4f1dx14)})};exports[_0x2646[42]]= function(_0x4f1dx11,_0x4f1dx12){return Promise[_0x2646[41]]([])[_0x2646[21]](getMailQueues(_0x4f1dx11[_0x2646[32]]))[_0x2646[21]](function(_0x4f1dx1b){return MailRoom[_0x2646[40]](_[_0x2646[39]](Util[_0x2646[23]](_0x4f1dx11[_0x2646[22]],{status:_0x2646[43],updatedAt:{$gte:moment()[_0x2646[38]](_0x2646[37])}}),_0x4f1dx1b))})[_0x2646[21]](function(_0x4f1dx1a){return _0x4f1dx12[_0x2646[20]](200)[_0x2646[19]]({value:_0x4f1dx1a})})[_0x2646[18]](function(_0x4f1dx14){console[_0x2646[35]](_0x4f1dx14);return handleError(_0x4f1dx12,_0x4f1dx14)})};exports[_0x2646[44]]= function(_0x4f1dx11,_0x4f1dx12){return Promise[_0x2646[41]]([])[_0x2646[21]](getMailQueues(_0x4f1dx11[_0x2646[32]]))[_0x2646[21]](function(_0x4f1dx1b){return MailRoom[_0x2646[40]](_[_0x2646[39]](Util[_0x2646[23]](_0x4f1dx11[_0x2646[22]],{status:_0x2646[45],updatedAt:{$gte:moment()[_0x2646[38]](_0x2646[37])}}),_0x4f1dx1b))})[_0x2646[21]](function(_0x4f1dx1a){return _0x4f1dx12[_0x2646[20]](200)[_0x2646[19]]({value:_0x4f1dx1a})})[_0x2646[18]](function(_0x4f1dx14){console[_0x2646[35]](_0x4f1dx14);return handleError(_0x4f1dx12,_0x4f1dx14)})};exports[_0x2646[46]]= function(_0x4f1dx11,_0x4f1dx12){return Promise[_0x2646[41]]([])[_0x2646[21]](getMailQueues(_0x4f1dx11[_0x2646[32]]))[_0x2646[21]](function(_0x4f1dx1b){return MailRoom[_0x2646[40]](_[_0x2646[39]](Util[_0x2646[23]](_0x4f1dx11[_0x2646[22]],{status:_0x2646[47],updatedAt:{$gte:moment()[_0x2646[38]](_0x2646[37])}}),_0x4f1dx1b))})[_0x2646[21]](function(_0x4f1dx1a){return _0x4f1dx12[_0x2646[20]](200)[_0x2646[19]]({value:_0x4f1dx1a})})[_0x2646[18]](function(_0x4f1dx14){console[_0x2646[35]](_0x4f1dx14);return handleError(_0x4f1dx12,_0x4f1dx14)})};exports[_0x2646[48]]= function(_0x4f1dx11,_0x4f1dx12,_0x4f1dx13){switch(_0x4f1dx11[_0x2646[32]][_0x2646[33]]){case _0x2646[54]:return sequelize[_0x2646[22]](_0x2646[50],{replacements:{status:_0x2646[51],id:_0x4f1dx11[_0x2646[32]][_0x2646[28]]},type:sequelize[_0x2646[53]][_0x2646[52]]})[_0x2646[21]](function(_0x4f1dx15){return _0x4f1dx12[_0x2646[20]](200)[_0x2646[19]](_0x4f1dx15)})[_0x2646[18]](function(_0x4f1dx14){console[_0x2646[49]](_0x4f1dx14);return handleError(_0x4f1dx12,_0x4f1dx14)});default:return sequelize[_0x2646[22]](_0x2646[55],{replacements:{status:_0x2646[51],id:_0x4f1dx11[_0x2646[32]][_0x2646[28]]},type:sequelize[_0x2646[53]][_0x2646[52]]})[_0x2646[21]](function(_0x4f1dx15){return _0x4f1dx12[_0x2646[20]](200)[_0x2646[19]](_0x4f1dx15)})[_0x2646[18]](function(_0x4f1dx14){return handleError(_0x4f1dx12,_0x4f1dx14)})}};exports[_0x2646[56]]= function(_0x4f1dx11,_0x4f1dx12,_0x4f1dx13){return MailRoom[_0x2646[58]]({where:{UserId:_0x4f1dx11[_0x2646[57]][_0x2646[28]]},include:[{all:true}]})[_0x2646[21]](function(_0x4f1dx1c){return _0x4f1dx12[_0x2646[20]](200)[_0x2646[19]](_0x4f1dx1c)})[_0x2646[18]](function(_0x4f1dx14){return handleError(_0x4f1dx12,_0x4f1dx14)})};exports[_0x2646[59]]= function(_0x4f1dx11,_0x4f1dx12,_0x4f1dx13){var _0x4f1dx1d;var _0x4f1dx1e=[];console[_0x2646[35]](_0x4f1dx11[_0x2646[60]]);console[_0x2646[35]](_0x4f1dx11[_0x2646[57]]);return MailRoom[_0x2646[67]](_0x4f1dx11[_0x2646[60]],{where:{id:_0x4f1dx11[_0x2646[57]][_0x2646[28]][_0x2646[63]](_0x2646[62])},individualHooks:true})[_0x2646[21]](function(){return Status[_0x2646[66]](_[_0x2646[29]](_0x4f1dx11[_0x2646[57]][_0x2646[28]][_0x2646[63]](_0x2646[62]),function(_0x4f1dx1f){return {status:_0x4f1dx11[_0x2646[60]][_0x2646[20]],data1:_0x4f1dx11[_0x2646[32]][_0x2646[64]],data2:_0x4f1dx11[_0x2646[32]][_0x2646[65]],MailRoomId:_0x4f1dx1f,UserId:_0x4f1dx11[_0x2646[32]][_0x2646[28]]}}))})[_0x2646[21]](function(_0x4f1dx1c){return _0x4f1dx12[_0x2646[61]](200)})[_0x2646[18]](function(_0x4f1dx14){return handleError(_0x4f1dx12,_0x4f1dx14)})};exports[_0x2646[68]]= function(_0x4f1dx11,_0x4f1dx12,_0x4f1dx13){return MailMessage[_0x2646[31]](_0x4f1dx11[_0x2646[57]][_0x2646[28]])[_0x2646[21]](function(_0x4f1dx21){return _0x4f1dx21[_0x2646[70]]({include:[{model:MailAccount},{model:MailMessage,include:[{model:MailAttachment},{model:User,attributes:[_0x2646[28],_0x2646[64],_0x2646[65],_0x2646[69]]}]},{model:User,attributes:[_0x2646[28],_0x2646[64],_0x2646[65],_0x2646[69]]}]})})[_0x2646[21]](function(_0x4f1dx20){return _0x4f1dx12[_0x2646[19]](_0x4f1dx20)})[_0x2646[18]](function(_0x4f1dx14){return handleError(_0x4f1dx12,_0x4f1dx14)})};exports[_0x2646[71]]= function(_0x4f1dx11,_0x4f1dx12,_0x4f1dx13){return MailRoom[_0x2646[26]](_0x2646[25])[_0x2646[31]](_0x4f1dx11[_0x2646[57]][_0x2646[28]])[_0x2646[21]](function(_0x4f1dx20){if(!_0x4f1dx20){return _0x4f1dx12[_0x2646[61]](404)};return _0x4f1dx12[_0x2646[19]](_0x4f1dx20)})[_0x2646[18]](function(_0x4f1dx14){console[_0x2646[49]](_0x4f1dx14);return handleError(_0x4f1dx12,_0x4f1dx14)})};exports[_0x2646[72]]= function(_0x4f1dx11,_0x4f1dx12,_0x4f1dx13){return MailRoom[_0x2646[31]](_0x4f1dx11[_0x2646[57]][_0x2646[28]])[_0x2646[21]](function(_0x4f1dx20){if(!_0x4f1dx20){return _0x4f1dx12[_0x2646[61]](404)};return _0x4f1dx20[_0x2646[74]]({attributes:[_0x2646[28],_0x2646[64],_0x2646[65],_0x2646[69],_0x2646[33],_0x2646[73]]})})[_0x2646[21]](function(_0x4f1dx22){return _0x4f1dx12[_0x2646[19]](_0x4f1dx22)})[_0x2646[18]](function(_0x4f1dx14){return handleError(_0x4f1dx12,_0x4f1dx14)})};exports[_0x2646[75]]= function(_0x4f1dx11,_0x4f1dx12,_0x4f1dx13){return MailRoom[_0x2646[75]](_0x4f1dx11[_0x2646[60]])[_0x2646[21]](function(_0x4f1dx20){return _0x4f1dx12[_0x2646[20]](201)[_0x2646[19]](_0x4f1dx20)})[_0x2646[18]](function(_0x4f1dx14){return handleError(_0x4f1dx12,_0x4f1dx14)})};exports[_0x2646[76]]= function(_0x4f1dx11,_0x4f1dx12,_0x4f1dx13){_0x4f1dx11[_0x2646[60]][_0x2646[77]]= _0x4f1dx11[_0x2646[32]][_0x2646[28]];_0x4f1dx11[_0x2646[60]][_0x2646[78]]= _0x4f1dx11[_0x2646[57]][_0x2646[28]];_0x4f1dx11[_0x2646[60]][_0x2646[79]]= (_0x4f1dx11[_0x2646[60]][_0x2646[80]]&& _0x4f1dx11[_0x2646[60]][_0x2646[80]][_0x2646[81]])?true:false;_0x4f1dx11[_0x2646[60]][_0x2646[82]]= _0x4f1dx11[_0x2646[60]][_0x2646[82]]|| htmlToText[_0x2646[84]](_0x4f1dx11[_0x2646[60]][_0x2646[83]],{wordwrap:false});return MailRoom[_0x2646[31]](_0x4f1dx11[_0x2646[57]][_0x2646[28]])[_0x2646[21]](function(_0x4f1dx20){_0x4f1dx11[_0x2646[60]][_0x2646[85]]= _0x4f1dx20[_0x2646[86]];return MailMessage[_0x2646[75]](_0x4f1dx11[_0x2646[60]],{include:[{model:MailAttachment}],user:_0x4f1dx11[_0x2646[32]]})})[_0x2646[21]](function(_0x4f1dx21){return _0x4f1dx12[_0x2646[20]](201)[_0x2646[19]](_0x4f1dx21)})[_0x2646[18]](function(_0x4f1dx14){return handleError(_0x4f1dx12,_0x4f1dx14)})};exports[_0x2646[67]]= function(_0x4f1dx11,_0x4f1dx12,_0x4f1dx13){return MailRoom[_0x2646[31]](_0x4f1dx11[_0x2646[57]][_0x2646[28]])[_0x2646[21]](function(_0x4f1dx20){if(!_0x4f1dx20){return _0x4f1dx12[_0x2646[61]](404)};return _0x4f1dx20[_0x2646[67]](_0x4f1dx11[_0x2646[60]])})[_0x2646[21]](function(_0x4f1dx20){return _0x4f1dx12[_0x2646[20]](200)[_0x2646[19]](_0x4f1dx20)})[_0x2646[18]](function(_0x4f1dx14){return handleError(_0x4f1dx12,_0x4f1dx14)})};exports[_0x2646[87]]= function(_0x4f1dx11,_0x4f1dx12,_0x4f1dx13){var _0x4f1dx23={where:{id:_0x4f1dx11[_0x2646[57]][_0x2646[28]][_0x2646[63]](_0x2646[62])},user:_0x4f1dx11[_0x2646[32]],individualHooks:true};return MailRoom[_0x2646[67]](_0x4f1dx11[_0x2646[60]],_0x4f1dx23)[_0x2646[21]](function(_0x4f1dx1c){if(!_0x4f1dx1c){return _0x4f1dx12[_0x2646[61]](404)};return _0x4f1dx1c})[_0x2646[21]](function(_0x4f1dx1c){return _0x4f1dx12[_0x2646[61]](200)})[_0x2646[18]](function(_0x4f1dx14){return handleError(_0x4f1dx12,_0x4f1dx14)})};exports[_0x2646[88]]= function(_0x4f1dx11,_0x4f1dx12,_0x4f1dx13){return MailRoom[_0x2646[31]](_0x4f1dx11[_0x2646[57]][_0x2646[28]])[_0x2646[21]](function(_0x4f1dx20){if(!_0x4f1dx20){return _0x4f1dx12[_0x2646[61]](404)};return _0x4f1dx20[_0x2646[90]](_0x4f1dx11[_0x2646[60]][_0x2646[89]],{individualHooks:true})})[_0x2646[21]](function(){return _0x4f1dx12[_0x2646[61]](200)})[_0x2646[18]](function(_0x4f1dx14){return handleError(_0x4f1dx12,_0x4f1dx14)})};exports[_0x2646[91]]= function(_0x4f1dx11,_0x4f1dx12,_0x4f1dx13){return MailRoom[_0x2646[31]](_0x4f1dx11[_0x2646[57]][_0x2646[28]])[_0x2646[21]](function(_0x4f1dx20){if(!_0x4f1dx20){return _0x4f1dx12[_0x2646[61]](404)};return _0x4f1dx20[_0x2646[91]]()})[_0x2646[21]](function(){return _0x4f1dx12[_0x2646[61]](204)})[_0x2646[18]](function(_0x4f1dx14){return handleError(_0x4f1dx12,_0x4f1dx14)})};exports[_0x2646[92]]= function(_0x4f1dx11,_0x4f1dx12){return MailRoom[_0x2646[91]]({where:{id:_0x4f1dx11[_0x2646[22]][_0x2646[93]]},individualHooks:true})[_0x2646[21]](function(){return _0x4f1dx12[_0x2646[61]](200)})[_0x2646[18]](function(_0x4f1dx14){return handleError(_0x4f1dx12,_0x4f1dx14)})};function handleError(_0x4f1dx12,_0x4f1dx14){return _0x4f1dx12[_0x2646[20]](500)[_0x2646[19]](_0x4f1dx14)}
\ No newline at end of file