Built motion from commit b33b832.|1.0.17
[motion.git] / server / api / fax_message / fax_message.controller.js
index 2cf3d71..11d232c 100644 (file)
@@ -1 +1 @@
-var _0x8d66=["\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"];_0x8d66[0];var _=require(_0x8d66[1]);var fs=require(_0x8d66[2]);var path=require(_0x8d66[3]);var uploadFile=require(_0x8d66[4]);var uuidLib=require(_0x8d66[5]);var pdf=require(_0x8d66[6]);var formidable=require(_0x8d66[7]);var exec=require(_0x8d66[9])[_0x8d66[8]];var config=require(_0x8d66[10]);var FaxMessage=require(_0x8d66[12])[_0x8d66[11]];var FaxRoom=require(_0x8d66[12])[_0x8d66[13]];var FaxAccount=require(_0x8d66[12])[_0x8d66[14]];var Contact=require(_0x8d66[12])[_0x8d66[15]];exports[_0x8d66[16]]=function(_0x3b75xe,_0x3b75xf){FaxMessage[_0x8d66[25]]({where:_0x3b75xe[_0x8d66[21]],order:_0x8d66[22],include:[{model:Contact,as:_0x8d66[23]},{model:Contact,as:_0x8d66[24]},{model:FaxRoom,include:[{model:FaxAccount}]}]})[_0x8d66[20]](function(_0x3b75x11){return _0x3b75xf[_0x8d66[19]](200)[_0x8d66[18]](_0x3b75x11)})[_0x8d66[17]](function(_0x3b75x10){return handleError(_0x3b75xf,_0x3b75x10)})};exports[_0x8d66[26]]=function(_0x3b75xe,_0x3b75xf){FaxMessage[_0x8d66[30]]({where:{id:_0x3b75xe[_0x8d66[29]][_0x8d66[28]]},include:[{model:Contact,as:_0x8d66[23]},{model:Contact,as:_0x8d66[24]}]})[_0x8d66[20]](function(_0x3b75x12){if(!_0x3b75x12){return _0x3b75xf[_0x8d66[27]](404)};return _0x3b75xf[_0x8d66[18]](_0x3b75x12)})[_0x8d66[17]](function(_0x3b75x10){return handleError(_0x3b75xf,_0x3b75x10)})};exports[_0x8d66[31]]=function(_0x3b75xe,_0x3b75xf,_0x3b75x13){FaxMessage[_0x8d66[31]](_0x3b75xe[_0x8d66[32]])[_0x8d66[20]](function(_0x3b75x12){return _0x3b75xf[_0x8d66[19]](201)[_0x8d66[18]](_0x3b75x12)})[_0x8d66[17]](function(_0x3b75x10){return handleError(_0x3b75xf,_0x3b75x10)})};function convertPdfAndSendFax(_0x3b75xe,_0x3b75xf,_0x3b75x15,_0x3b75x16){var _0x3b75x17=path[_0x8d66[40]](config[_0x8d66[33]],_0x8d66[34],_0x8d66[35],_0x8d66[36],_0x8d66[37],_0x8d66[38],_0x3b75x15+_0x8d66[39]);var _0x3b75x18=path[_0x8d66[40]](config[_0x8d66[33]],_0x8d66[34],_0x8d66[35],_0x8d66[36],_0x8d66[37],_0x8d66[41],_0x3b75x15+_0x8d66[42]);var _0x3b75x19=_0x8d66[43]+_0x8d66[44]+_0x8d66[45]+_0x3b75x18+_0x8d66[46]+_0x3b75x17;var _0x3b75x1a=uuidLib[_0x8d66[47]]();FaxAccount[_0x8d66[75]](_0x3b75x16[_0x8d66[71]])[_0x8d66[20]](function(_0x3b75x1b){if(_0x3b75x1b){var _0x3b75x1c={technology:_0x8d66[48],to:_0x3b75x16[_0x8d66[49]],from:_0x3b75x1b[_0x8d66[50]],fax_file:_0x3b75x18,fax_header:_0x3b75x1b[_0x8d66[51]],fax_localid:_0x3b75x1b[_0x8d66[52]],maxrate:_0x3b75x1b[_0x8d66[53]],minrate:_0x3b75x1b[_0x8d66[54]],ecm:_0x3b75x1b[_0x8d66[55]],uuid:_0x3b75x1a,trunk:{id:_0x3b75x1b[_0x8d66[56]]}};fs[_0x8d66[74]](_0x3b75x17,function(_0x3b75x1d){if(!_0x3b75x1d){handleError(_0x3b75xf, new Error(_0x8d66[57]))}else {exec(_0x3b75x19,function(_0x3b75x10){if(_0x3b75x10){console[_0x8d66[58]](_0x3b75x10);handleError(_0x3b75xf,_0x3b75x10)}else {console[_0x8d66[60]](_0x8d66[59]);fs[_0x8d66[73]](_0x3b75x18,511,function(_0x3b75x10){if(_0x3b75x16[_0x8d66[61]]){FaxRoom[_0x8d66[65]]({where:{id:_0x3b75x16[_0x8d66[61]]},defaults:{}})[_0x8d66[63]](function(_0x3b75x1e,_0x3b75x1f){FaxMessage[_0x8d66[31]]({status:_0x8d66[68],read:true,filenamePDF:_0x3b75x15+_0x8d66[39],filename:_0x3b75x15+_0x8d66[42],body:JSON[_0x8d66[69]](_0x3b75x1c),uuid:_0x3b75x1a,FaxRoomId:_0x3b75x1e[_0x8d66[28]]})[_0x8d66[20]](function(_0x3b75x20){Contact[_0x8d66[65]]({where:{phone:_0x3b75x1c[_0x8d66[64]]},defaults:{phone:_0x3b75x1c[_0x8d66[64]],fullname:_0x3b75x1c[_0x8d66[64]]}})[_0x8d66[63]](function(_0x3b75x21,_0x3b75x1f){_0x3b75x20[_0x8d66[62]](_0x3b75x21)});Contact[_0x8d66[65]]({where:{phone:_0x3b75x1c[_0x8d66[67]]},defaults:{phone:_0x3b75x1c[_0x8d66[67]],fullname:_0x3b75x1c[_0x8d66[67]]}})[_0x8d66[63]](function(_0x3b75x21,_0x3b75x1f){_0x3b75x20[_0x8d66[66]](_0x3b75x21)});return _0x3b75xf[_0x8d66[19]](200)[_0x8d66[18]](_0x3b75x20)})[_0x8d66[17]](function(_0x3b75x10){handleError(_0x3b75xf,_0x3b75x10)})})}else {FaxRoom[_0x8d66[31]]({status:_0x8d66[70],from:_0x3b75x16[_0x8d66[49]],FaxAccountId:_0x3b75x16[_0x8d66[71]],UserId:_0x3b75x16[_0x8d66[72]]})[_0x8d66[20]](function(_0x3b75x1e){FaxMessage[_0x8d66[31]]({status:_0x8d66[68],read:true,filenamePDF:_0x3b75x15+_0x8d66[39],filename:_0x3b75x15+_0x8d66[42],body:JSON[_0x8d66[69]](_0x3b75x1c),uuid:_0x3b75x1a,FaxRoomId:_0x3b75x1e[_0x8d66[28]]})[_0x8d66[20]](function(_0x3b75x20){Contact[_0x8d66[65]]({where:{phone:_0x3b75x1c[_0x8d66[64]]},defaults:{phone:_0x3b75x1c[_0x8d66[64]],fullname:_0x3b75x1c[_0x8d66[64]]}})[_0x8d66[63]](function(_0x3b75x21,_0x3b75x1f){_0x3b75x20[_0x8d66[62]](_0x3b75x21)});Contact[_0x8d66[65]]({where:{phone:_0x3b75x1c[_0x8d66[67]]},defaults:{phone:_0x3b75x1c[_0x8d66[67]],fullname:_0x3b75x1c[_0x8d66[67]]}})[_0x8d66[63]](function(_0x3b75x21,_0x3b75x1f){_0x3b75x20[_0x8d66[66]](_0x3b75x21)});return _0x3b75xf[_0x8d66[19]](200)[_0x8d66[18]](_0x3b75x20)})[_0x8d66[17]](function(_0x3b75x10){handleError(_0x3b75xf,_0x3b75x10)})})[_0x8d66[17]](function(_0x3b75x10){handleError(_0x3b75xf,_0x3b75x10)})}})}})}})}})}exports[_0x8d66[76]]=function(_0x3b75xe,_0x3b75xf){if(_0x3b75xe[_0x8d66[32]][_0x8d66[28]]){delete _0x3b75xe[_0x8d66[32]][_0x8d66[28]]};FaxMessage[_0x8d66[30]]({where:{id:_0x3b75xe[_0x8d66[29]][_0x8d66[28]]},include:[{model:Contact,as:_0x8d66[23]},{model:Contact,as:_0x8d66[24]}]})[_0x8d66[20]](function(_0x3b75x12){if(!_0x3b75x12){return _0x3b75xf[_0x8d66[27]](404)};var _0x3b75x22=_[_0x8d66[77]](_0x3b75x12,_0x3b75xe[_0x8d66[32]]);_0x3b75x22[_0x8d66[78]]()[_0x8d66[20]](function(){return _0x3b75xf[_0x8d66[19]](200)[_0x8d66[18]](_0x3b75x12)})[_0x8d66[17]](function(_0x3b75x10){return handleError(_0x3b75xf,_0x3b75x10)})})[_0x8d66[17]](function(_0x3b75x10){return handleError(_0x3b75xf,_0x3b75x10)})};exports[_0x8d66[79]]=function(_0x3b75xe,_0x3b75xf){FaxMessage[_0x8d66[80]]({where:{id:_0x3b75xe[_0x8d66[29]][_0x8d66[28]]}})[_0x8d66[20]](function(_0x3b75x12){if(!_0x3b75x12){return _0x3b75xf[_0x8d66[27]](404)};_0x3b75x12[_0x8d66[79]]()[_0x8d66[20]](function(){return _0x3b75xf[_0x8d66[27]](204)})[_0x8d66[17]](function(_0x3b75x10){return handleError(_0x3b75xf,_0x3b75x10)})})[_0x8d66[17]](function(_0x3b75x10){return handleError(_0x3b75xf,_0x3b75x10)})};exports[_0x8d66[81]]=function(_0x3b75xe,_0x3b75xf){FaxMessage[_0x8d66[75]](_0x3b75xe[_0x8d66[29]][_0x8d66[28]])[_0x8d66[20]](function(_0x3b75x12){if(!_0x3b75x12){return _0x3b75xf[_0x8d66[27]](404)};if(_0x3b75x12[_0x8d66[82]]){if(_0x3b75x12[_0x8d66[19]]===_0x8d66[83]){var _0x3b75x23=path[_0x8d66[40]](config[_0x8d66[33]],_0x8d66[34],_0x8d66[35],_0x8d66[36],_0x8d66[84],_0x3b75x12[_0x8d66[82]]);fs[_0x8d66[74]](_0x3b75x23,function(_0x3b75x1d){if(_0x3b75x1d){return _0x3b75xf[_0x8d66[85]](_0x3b75x23)}else {return _0x3b75xf[_0x8d66[27]](404)}})}else {if(_0x3b75x12[_0x8d66[19]]===_0x8d66[68]||_0x3b75x12[_0x8d66[86]]===_0x8d66[87]||_0x3b75x12[_0x8d66[19]]===_0x8d66[88]){var _0x3b75x23=path[_0x8d66[40]](config[_0x8d66[33]],_0x8d66[34],_0x8d66[35],_0x8d66[36],_0x8d66[37],_0x8d66[38],_0x3b75x12[_0x8d66[82]]);fs[_0x8d66[74]](_0x3b75x23,function(_0x3b75x1d){if(_0x3b75x1d){return _0x3b75xf[_0x8d66[85]](_0x3b75x23)}else {return _0x3b75xf[_0x8d66[27]](404)}})}}}else {_0x3b75xf[_0x8d66[27]](404)}})[_0x8d66[17]](function(_0x3b75x10){return handleError(_0x3b75xf,_0x3b75x10)})};function handleError(_0x3b75xf,_0x3b75x10){return _0x3b75xf[_0x8d66[19]](500)[_0x8d66[18]](_0x3b75x10)}
\ 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