Built motion from commit b33b832.|1.0.17
[motion.git] / server / api / fax_message / fax_message.controller.js
index fcf4a5d..11d232c 100644 (file)
@@ -1 +1 @@
-var _0x12d4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x66\x73","\x70\x61\x74\x68","\x75\x70\x6C\x6F\x61\x64\x2D\x66\x69\x6C\x65","\x6E\x6F\x64\x65\x2D\x75\x75\x69\x64","\x68\x74\x6D\x6C\x2D\x70\x64\x66","\x66\x6F\x72\x6D\x69\x64\x61\x62\x6C\x65","\x65\x78\x65\x63","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x52\x6F\x6F\x6D","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x43\x6F\x6E\x74\x61\x63\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","\x63\x72\x65\x61\x74\x65\x64\x41\x74\x20\x44\x45\x53\x43","\x46\x72\x6F\x6D","\x54\x6F","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x66\x61\x78","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x6F\x72\x69\x67\x69\x6E\x61\x6C","\x2E\x70\x64\x66","\x6A\x6F\x69\x6E","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x2E\x74\x69\x66","\x67\x73","\x20\x2D\x71\x20\x2D\x64\x4E\x4F\x50\x41\x55\x53\x45\x20\x2D\x64\x42\x41\x54\x43\x48\x20\x2D\x73\x44\x45\x56\x49\x43\x45\x3D\x74\x69\x66\x66\x67\x34\x20","\x2D\x73\x50\x41\x50\x45\x52\x53\x49\x5A\x45\x3D\x6C\x65\x74\x74\x65\x72\x20\x2D\x73\x4F\x75\x74\x70\x75\x74\x46\x69\x6C\x65\x3D","\x20","\x76\x34","\x53\x49\x50","\x74\x6F\x4E\x75\x6D","\x70\x68\x6F\x6E\x65","\x66\x61\x78\x68\x65\x61\x64\x65\x72","\x6C\x6F\x63\x61\x6C\x69\x64","\x6D\x61\x78\x72\x61\x74\x65","\x6D\x69\x6E\x72\x61\x74\x65","\x65\x63\x6D","\x54\x72\x75\x6E\x6B\x49\x64","\x46\x69\x6C\x65\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74\x73","\x65\x72\x72\x6F\x72","\x46\x61\x78\x3A\x20\x50\x44\x46\x20\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x20\x74\x6F\x20\x54\x49\x46\x46","\x6C\x6F\x67","\x72\x6F\x6F\x6D\x49\x64","\x73\x65\x74\x46\x72\x6F\x6D","\x73\x70\x72\x65\x61\x64","\x66\x72\x6F\x6D","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x73\x65\x74\x54\x6F","\x74\x6F","\x4E\x4F\x54\x20\x53\x45\x4E\x54","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x4F\x50\x45\x4E","\x61\x63\x63\x6F\x75\x6E\x74\x49\x64","\x75\x73\x65\x72\x49\x64","\x63\x68\x6D\x6F\x64","\x65\x78\x69\x73\x74\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x66\x69\x6E\x64","\x67\x65\x74\x43\x6F\x6E\x74\x65\x6E\x74\x46\x72\x6F\x6D\x4D\x65\x73\x73\x61\x67\x65","\x66\x69\x6C\x65\x6E\x61\x6D\x65\x50\x44\x46","\x52\x45\x43\x45\x49\x56\x45\x44","\x69\x6E\x62\x6F\x75\x6E\x64","\x73\x65\x6E\x64\x46\x69\x6C\x65","\x64\x69\x72\x65\x63\x74\x6F\x72\x79","\x53\x45\x4E\x54","\x46\x41\x49\x4C\x45\x44"];_0x12d4[0];var _=require(_0x12d4[1]);var fs=require(_0x12d4[2]);var path=require(_0x12d4[3]);var uploadFile=require(_0x12d4[4]);var uuidLib=require(_0x12d4[5]);var pdf=require(_0x12d4[6]);var formidable=require(_0x12d4[7]);var exec=require(_0x12d4[9])[_0x12d4[8]];var config=require(_0x12d4[10]);var FaxMessage=require(_0x12d4[12])[_0x12d4[11]];var FaxRoom=require(_0x12d4[12])[_0x12d4[13]];var FaxAccount=require(_0x12d4[12])[_0x12d4[14]];var Contact=require(_0x12d4[12])[_0x12d4[15]];exports[_0x12d4[16]]=function(_0xcb12xe,_0xcb12xf){FaxMessage[_0x12d4[25]]({where:_0xcb12xe[_0x12d4[21]],order:_0x12d4[22],include:[{model:Contact,as:_0x12d4[23]},{model:Contact,as:_0x12d4[24]},{model:FaxRoom,include:[{model:FaxAccount}]}]})[_0x12d4[20]](function(_0xcb12x11){return _0xcb12xf[_0x12d4[19]](200)[_0x12d4[18]](_0xcb12x11)})[_0x12d4[17]](function(_0xcb12x10){return handleError(_0xcb12xf,_0xcb12x10)})};exports[_0x12d4[26]]=function(_0xcb12xe,_0xcb12xf){FaxMessage[_0x12d4[30]]({where:{id:_0xcb12xe[_0x12d4[29]][_0x12d4[28]]},include:[{model:Contact,as:_0x12d4[23]},{model:Contact,as:_0x12d4[24]}]})[_0x12d4[20]](function(_0xcb12x12){if(!_0xcb12x12){return _0xcb12xf[_0x12d4[27]](404)};return _0xcb12xf[_0x12d4[18]](_0xcb12x12)})[_0x12d4[17]](function(_0xcb12x10){return handleError(_0xcb12xf,_0xcb12x10)})};exports[_0x12d4[31]]=function(_0xcb12xe,_0xcb12xf,_0xcb12x13){FaxMessage[_0x12d4[31]](_0xcb12xe[_0x12d4[32]])[_0x12d4[20]](function(_0xcb12x12){return _0xcb12xf[_0x12d4[19]](201)[_0x12d4[18]](_0xcb12x12)})[_0x12d4[17]](function(_0xcb12x10){return handleError(_0xcb12xf,_0xcb12x10)})};function convertPdfAndSendFax(_0xcb12xe,_0xcb12xf,_0xcb12x15,_0xcb12x16){var _0xcb12x17=path[_0x12d4[40]](config[_0x12d4[33]],_0x12d4[34],_0x12d4[35],_0x12d4[36],_0x12d4[37],_0x12d4[38],_0xcb12x15+_0x12d4[39]);var _0xcb12x18=path[_0x12d4[40]](config[_0x12d4[33]],_0x12d4[34],_0x12d4[35],_0x12d4[36],_0x12d4[37],_0x12d4[41],_0xcb12x15+_0x12d4[42]);var _0xcb12x19=_0x12d4[43]+_0x12d4[44]+_0x12d4[45]+_0xcb12x18+_0x12d4[46]+_0xcb12x17;var _0xcb12x1a=uuidLib[_0x12d4[47]]();FaxAccount[_0x12d4[75]](_0xcb12x16[_0x12d4[71]])[_0x12d4[20]](function(_0xcb12x1b){if(_0xcb12x1b){var _0xcb12x1c={technology:_0x12d4[48],to:_0xcb12x16[_0x12d4[49]],from:_0xcb12x1b[_0x12d4[50]],fax_file:_0xcb12x18,fax_header:_0xcb12x1b[_0x12d4[51]],fax_localid:_0xcb12x1b[_0x12d4[52]],maxrate:_0xcb12x1b[_0x12d4[53]],minrate:_0xcb12x1b[_0x12d4[54]],ecm:_0xcb12x1b[_0x12d4[55]],uuid:_0xcb12x1a,trunk:{id:_0xcb12x1b[_0x12d4[56]]}};fs[_0x12d4[74]](_0xcb12x17,function(_0xcb12x1d){if(!_0xcb12x1d){handleError(_0xcb12xf, new Error(_0x12d4[57]))}else {exec(_0xcb12x19,function(_0xcb12x10){if(_0xcb12x10){console[_0x12d4[58]](_0xcb12x10);handleError(_0xcb12xf,_0xcb12x10)}else {console[_0x12d4[60]](_0x12d4[59]);fs[_0x12d4[73]](_0xcb12x18,511,function(_0xcb12x10){if(_0xcb12x16[_0x12d4[61]]){FaxRoom[_0x12d4[65]]({where:{id:_0xcb12x16[_0x12d4[61]]},defaults:{}})[_0x12d4[63]](function(_0xcb12x1e,_0xcb12x1f){FaxMessage[_0x12d4[31]]({status:_0x12d4[68],read:true,filenamePDF:_0xcb12x15+_0x12d4[39],filename:_0xcb12x15+_0x12d4[42],body:JSON[_0x12d4[69]](_0xcb12x1c),uuid:_0xcb12x1a,FaxRoomId:_0xcb12x1e[_0x12d4[28]]})[_0x12d4[20]](function(_0xcb12x20){Contact[_0x12d4[65]]({where:{phone:_0xcb12x1c[_0x12d4[64]]},defaults:{phone:_0xcb12x1c[_0x12d4[64]],fullname:_0xcb12x1c[_0x12d4[64]]}})[_0x12d4[63]](function(_0xcb12x21,_0xcb12x1f){_0xcb12x20[_0x12d4[62]](_0xcb12x21)});Contact[_0x12d4[65]]({where:{phone:_0xcb12x1c[_0x12d4[67]]},defaults:{phone:_0xcb12x1c[_0x12d4[67]],fullname:_0xcb12x1c[_0x12d4[67]]}})[_0x12d4[63]](function(_0xcb12x21,_0xcb12x1f){_0xcb12x20[_0x12d4[66]](_0xcb12x21)});return _0xcb12xf[_0x12d4[19]](200)[_0x12d4[18]](_0xcb12x20)})[_0x12d4[17]](function(_0xcb12x10){handleError(_0xcb12xf,_0xcb12x10)})})}else {FaxRoom[_0x12d4[31]]({status:_0x12d4[70],from:_0xcb12x16[_0x12d4[49]],FaxAccountId:_0xcb12x16[_0x12d4[71]],UserId:_0xcb12x16[_0x12d4[72]]})[_0x12d4[20]](function(_0xcb12x1e){FaxMessage[_0x12d4[31]]({status:_0x12d4[68],read:true,filenamePDF:_0xcb12x15+_0x12d4[39],filename:_0xcb12x15+_0x12d4[42],body:JSON[_0x12d4[69]](_0xcb12x1c),uuid:_0xcb12x1a,FaxRoomId:_0xcb12x1e[_0x12d4[28]]})[_0x12d4[20]](function(_0xcb12x20){Contact[_0x12d4[65]]({where:{phone:_0xcb12x1c[_0x12d4[64]]},defaults:{phone:_0xcb12x1c[_0x12d4[64]],fullname:_0xcb12x1c[_0x12d4[64]]}})[_0x12d4[63]](function(_0xcb12x21,_0xcb12x1f){_0xcb12x20[_0x12d4[62]](_0xcb12x21)});Contact[_0x12d4[65]]({where:{phone:_0xcb12x1c[_0x12d4[67]]},defaults:{phone:_0xcb12x1c[_0x12d4[67]],fullname:_0xcb12x1c[_0x12d4[67]]}})[_0x12d4[63]](function(_0xcb12x21,_0xcb12x1f){_0xcb12x20[_0x12d4[66]](_0xcb12x21)});return _0xcb12xf[_0x12d4[19]](200)[_0x12d4[18]](_0xcb12x20)})[_0x12d4[17]](function(_0xcb12x10){handleError(_0xcb12xf,_0xcb12x10)})})[_0x12d4[17]](function(_0xcb12x10){handleError(_0xcb12xf,_0xcb12x10)})}})}})}})}})}exports[_0x12d4[76]]=function(_0xcb12xe,_0xcb12xf){if(_0xcb12xe[_0x12d4[32]][_0x12d4[28]]){delete _0xcb12xe[_0x12d4[32]][_0x12d4[28]]};FaxMessage[_0x12d4[30]]({where:{id:_0xcb12xe[_0x12d4[29]][_0x12d4[28]]},include:[{model:Contact,as:_0x12d4[23]},{model:Contact,as:_0x12d4[24]}]})[_0x12d4[20]](function(_0xcb12x12){if(!_0xcb12x12){return _0xcb12xf[_0x12d4[27]](404)};var _0xcb12x22=_[_0x12d4[77]](_0xcb12x12,_0xcb12xe[_0x12d4[32]]);_0xcb12x22[_0x12d4[78]]()[_0x12d4[20]](function(){return _0xcb12xf[_0x12d4[19]](200)[_0x12d4[18]](_0xcb12x12)})[_0x12d4[17]](function(_0xcb12x10){return handleError(_0xcb12xf,_0xcb12x10)})})[_0x12d4[17]](function(_0xcb12x10){return handleError(_0xcb12xf,_0xcb12x10)})};exports[_0x12d4[79]]=function(_0xcb12xe,_0xcb12xf){FaxMessage[_0x12d4[80]]({where:{id:_0xcb12xe[_0x12d4[29]][_0x12d4[28]]}})[_0x12d4[20]](function(_0xcb12x12){if(!_0xcb12x12){return _0xcb12xf[_0x12d4[27]](404)};_0xcb12x12[_0x12d4[79]]()[_0x12d4[20]](function(){return _0xcb12xf[_0x12d4[27]](204)})[_0x12d4[17]](function(_0xcb12x10){return handleError(_0xcb12xf,_0xcb12x10)})})[_0x12d4[17]](function(_0xcb12x10){return handleError(_0xcb12xf,_0xcb12x10)})};exports[_0x12d4[81]]=function(_0xcb12xe,_0xcb12xf){FaxMessage[_0x12d4[75]](_0xcb12xe[_0x12d4[29]][_0x12d4[28]])[_0x12d4[20]](function(_0xcb12x12){if(!_0xcb12x12){return _0xcb12xf[_0x12d4[27]](404)};if(_0xcb12x12[_0x12d4[82]]){if(_0xcb12x12[_0x12d4[19]]===_0x12d4[83]){var _0xcb12x23=path[_0x12d4[40]](config[_0x12d4[33]],_0x12d4[34],_0x12d4[35],_0x12d4[36],_0x12d4[84],_0xcb12x12[_0x12d4[82]]);fs[_0x12d4[74]](_0xcb12x23,function(_0xcb12x1d){if(_0xcb12x1d){return _0xcb12xf[_0x12d4[85]](_0xcb12x23)}else {return _0xcb12xf[_0x12d4[27]](404)}})}else {if(_0xcb12x12[_0x12d4[19]]===_0x12d4[68]||_0xcb12x12[_0x12d4[86]]===_0x12d4[87]||_0xcb12x12[_0x12d4[19]]===_0x12d4[88]){var _0xcb12x23=path[_0x12d4[40]](config[_0x12d4[33]],_0x12d4[34],_0x12d4[35],_0x12d4[36],_0x12d4[37],_0x12d4[38],_0xcb12x12[_0x12d4[82]]);fs[_0x12d4[74]](_0xcb12x23,function(_0xcb12x1d){if(_0xcb12x1d){return _0xcb12xf[_0x12d4[85]](_0xcb12x23)}else {return _0xcb12xf[_0x12d4[27]](404)}})}}}else {_0xcb12xf[_0x12d4[27]](404)}})[_0x12d4[17]](function(_0xcb12x10){return handleError(_0xcb12xf,_0xcb12x10)})};function handleError(_0xcb12xf,_0xcb12x10){return _0xcb12xf[_0x12d4[19]](500)[_0x12d4[18]](_0xcb12x10)}
\ No newline at end of file
+var _0xd487=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x66\x73","\x70\x61\x74\x68","\x75\x70\x6C\x6F\x61\x64\x2D\x66\x69\x6C\x65","\x6E\x6F\x64\x65\x2D\x75\x75\x69\x64","\x68\x74\x6D\x6C\x2D\x70\x64\x66","\x66\x6F\x72\x6D\x69\x64\x61\x62\x6C\x65","\x65\x78\x65\x63","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x46\x61\x78\x52\x6F\x6F\x6D","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x55\x73\x65\x72","\x69\x6E\x64\x65\x78","\x63\x72\x65\x61\x74\x65\x64\x41\x74\x20\x44\x45\x53\x43","\x77\x68\x65\x72\x65","\x71\x75\x65\x72\x79","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x75\x73\x65\x72","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x55\x73\x65\x72\x49\x64","\x62\x6F\x64\x79","\x74\x65\x78\x74","\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x41\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x6D\x69","\x6C\x6F\x63\x61\x6C\x73","\x61\x70\x70","\x75\x70\x64\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x53\x45\x4E\x44\x49\x4E\x47","\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x41\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x6C\x65\x74\x65","\x54\x52\x41\x53\x48","\x62\x75\x6C\x6B\x55\x70\x64\x61\x74\x65"];_0xd487[0];var _=require(_0xd487[1]);var fs=require(_0xd487[2]);var path=require(_0xd487[3]);var uploadFile=require(_0xd487[4]);var uuidLib=require(_0xd487[5]);var pdf=require(_0xd487[6]);var formidable=require(_0xd487[7]);var exec=require(_0xd487[9])[_0xd487[8]];var config=require(_0xd487[10]);var FaxMessage=require(_0xd487[12])[_0xd487[11]];var FaxAttachment=require(_0xd487[12])[_0xd487[13]];var FaxRoom=require(_0xd487[12])[_0xd487[14]];var FaxAccount=require(_0xd487[12])[_0xd487[15]];var FaxAttachment=require(_0xd487[12])[_0xd487[13]];var User=require(_0xd487[12])[_0xd487[16]];exports[_0xd487[17]]= function(_0x620fxf,_0x620fx10,_0x620fx11){var _0x620fx12={order:_0xd487[18],include:[{all:true,include:[{all:true}]}]};switch(_0x620fxf[_0xd487[24]][_0xd487[23]]){case _0xd487[21]:_0x620fx12[_0xd487[19]]= _0x620fxf[_0xd487[20]];break;case _0xd487[22]:break;default:};return FaxMessage[_0xd487[29]](_0x620fx12)[_0xd487[28]](function(_0x620fx14){return _0x620fx10[_0xd487[27]](200)[_0xd487[26]](_0x620fx14)})[_0xd487[25]](function(_0x620fx13){return handleError(_0x620fx10,_0x620fx13,_0x620fx11)})};exports[_0xd487[30]]= function(_0x620fxf,_0x620fx10){return FaxMessage[_0xd487[30]]()[_0xd487[28]](function(_0x620fx15){return _0x620fx10[_0xd487[27]](200)[_0xd487[26]](_0x620fx15)})[_0xd487[25]](function(_0x620fx13){return handleError(_0x620fx10,_0x620fx13)})};exports[_0xd487[31]]= function(_0x620fxf,_0x620fx10,_0x620fx11){return FaxMessage[_0xd487[38]](_0x620fxf[_0xd487[34]][_0xd487[33]],{include:[{model:FaxAttachment},{model:User,attributes:[_0xd487[33],_0xd487[35],_0xd487[36],_0xd487[37]]}]})[_0xd487[28]](function(_0x620fx16){if(!_0x620fx16){return _0x620fx10[_0xd487[32]](404)};return _0x620fx10[_0xd487[26]](_0x620fx16)})[_0xd487[25]](function(_0x620fx13){return handleError(_0x620fx10,_0x620fx13,_0x620fx11)})};exports[_0xd487[39]]= function(_0x620fxf,_0x620fx10,_0x620fx11){_0x620fxf[_0xd487[41]][_0xd487[40]]= _0x620fxf[_0xd487[24]][_0xd487[33]];_0x620fxf[_0xd487[41]][_0xd487[42]]= _0x620fxf[_0xd487[41]][_0xd487[42]];return FaxMessage[_0xd487[39]](_0x620fxf[_0xd487[41]],{include:[{model:FaxAttachment}]})[_0xd487[28]](function(_0x620fx16){if(_0x620fx16){_0x620fxf[_0xd487[46]][_0xd487[45]][_0xd487[44]][_0xd487[26]]({message:_0xd487[43],doc:_0x620fx16,options:{user:_0x620fxf[_0xd487[24]]}})};return _0x620fx10[_0xd487[27]](201)[_0xd487[26]](_0x620fx16)})[_0xd487[25]](function(_0x620fx13){return handleError(_0x620fx10,_0x620fx13)})};exports[_0xd487[47]]= function(_0x620fxf,_0x620fx10,_0x620fx11){return FaxMessage[_0xd487[38]](_0x620fxf[_0xd487[34]][_0xd487[33]],{include:[{all:true}]})[_0xd487[28]](function(_0x620fx16){if(!_0x620fx16){return _0x620fx10[_0xd487[32]](404)};return _0x620fx16[_0xd487[51]](_0x620fxf[_0xd487[41]],{user:_0x620fxf[_0xd487[24]]})})[_0xd487[28]](function(_0x620fx17){if(_0x620fx17[_0xd487[48]](_0xd487[27])&& _0x620fx17[_0xd487[27]]=== _0xd487[49]){_0x620fxf[_0xd487[46]][_0xd487[45]][_0xd487[44]][_0xd487[26]]({message:_0xd487[50],doc:_0x620fx17,options:{user:_0x620fxf[_0xd487[24]]}})};return _0x620fx10[_0xd487[27]](200)[_0xd487[26]](_0x620fx17)})[_0xd487[25]](function(_0x620fx13){return handleError(_0x620fx10,_0x620fx13,_0x620fx11)})};exports[_0xd487[52]]= function(_0x620fxf,_0x620fx10,_0x620fx11){return FaxMessage[_0xd487[38]](_0x620fxf[_0xd487[34]][_0xd487[33]])[_0xd487[28]](function(_0x620fx16){if(!_0x620fx16){return _0x620fx10[_0xd487[32]](404)};return _0x620fx16[_0xd487[52]]()})[_0xd487[28]](function(){return _0x620fx10[_0xd487[32]](204)})[_0xd487[25]](function(_0x620fx13){return handleError(_0x620fx10,_0x620fx13,_0x620fx11)})};exports[_0xd487[53]]= function(_0x620fxf,_0x620fx10,_0x620fx11){return FaxMessage[_0xd487[55]]({where:{id:{$in:_0x620fxf[_0xd487[41]][_0xd487[33]]}},attributes:{directory:_0xd487[54]}})[_0xd487[28]](function(_0x620fx16){if(!_0x620fx16){return _0x620fx10[_0xd487[32]](404)};return _0x620fx16[_0xd487[52]]()})[_0xd487[28]](function(){return _0x620fx10[_0xd487[32]](204)})[_0xd487[25]](function(_0x620fx13){return handleError(_0x620fx10,_0x620fx13,_0x620fx11)})};function handleError(_0x620fx10,_0x620fx13,_0x620fx11){return _0x620fx10[_0xd487[27]](500)[_0xd487[26]](_0x620fx13)}
\ No newline at end of file