8337eb200b616a037944f33873525870f67d98ae
[motion.git] / server / api / fax_room / fax_room.controller.js
1 var _0x34e3=["\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","\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","\x46\x61\x78\x52\x6F\x6F\x6D","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x46\x61\x78\x51\x75\x65\x75\x65","\x46\x61\x78\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\x46\x61\x78\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\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x69\x64\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x66\x72\x6F\x6D\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x61\x63\x63\x6F\x75\x6E\x74\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x73\x74\x61\x74\x75\x73\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x6C\x61\x73\x74\x45\x76\x65\x6E\x74\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x75\x70\x64\x61\x74\x65\x64\x41\x74\x60\x20\x46\x52\x4F\x4D\x20\x60\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x41\x53\x20\x60\x46\x61\x78\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\x66\x61\x78\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\x66\x61\x78\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\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x55\x73\x65\x72\x49\x64\x60\x29\x20\x4F\x4E\x20\x60\x46\x61\x78\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\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x46\x61\x78\x52\x6F\x6F\x6D\x49\x64\x60\x20\x57\x48\x45\x52\x45\x20\x28\x60\x46\x61\x78\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\x46\x61\x78\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\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\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x57\x48\x45\x52\x45\x20\x60\x66\x61\x78\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","\x6F\x70\x65\x6E\x52\x6F\x6F\x6D","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x61\x64\x64\x55\x73\x65\x72","\x75\x70\x64\x61\x74\x65","\x73\x68\x6F\x77","\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","\x55\x73\x65\x72\x49\x64","\x46\x61\x78\x52\x6F\x6F\x6D\x49\x64","\x74\x65\x78\x74","\x6A\x6F\x62\x49\x64","\x46\x61\x78\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x61\x73\x73\x69\x67\x6E\x65\x64","\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","\x69\x64\x73","\x75\x70\x64\x61\x74\x65\x50\x61\x74\x63\x68","\x2C","\x73\x70\x6C\x69\x74","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x4D\x65\x73\x73\x61\x67\x65","\x67\x65\x74\x46\x61\x78\x52\x6F\x6F\x6D"];_0x34e3[0];var _=require(_0x34e3[1]);var util=require(_0x34e3[2]);var Util=require(_0x34e3[3]);var moment=require(_0x34e3[4]);var sequelize=require(_0x34e3[6])[_0x34e3[5]];var User=require(_0x34e3[6])[_0x34e3[7]];var Agent=require(_0x34e3[6])[_0x34e3[7]];var Contact=require(_0x34e3[6])[_0x34e3[8]];var FaxRoom=require(_0x34e3[6])[_0x34e3[9]];var FaxMessage=require(_0x34e3[6])[_0x34e3[10]];var FaxAccount=require(_0x34e3[6])[_0x34e3[11]];var FaxApplication=require(_0x34e3[6])[_0x34e3[12]];var FaxQueue=require(_0x34e3[6])[_0x34e3[13]];var FaxAttachment=require(_0x34e3[6])[_0x34e3[14]];exports[_0x34e3[15]]= function(_0xcb59xf,_0xcb59x10,_0xcb59x11){return FaxRoom[_0x34e3[24]](_0x34e3[23])[_0x34e3[22]](Util[_0x34e3[21]](_0xcb59xf[_0x34e3[20]]))[_0x34e3[19]](function(_0xcb59x13){return _0xcb59x10[_0x34e3[18]](200)[_0x34e3[17]](_0xcb59x13)})[_0x34e3[16]](function(_0xcb59x12){return handleError(_0xcb59x10,_0xcb59x12)})};exports[_0x34e3[25]]= function(_0xcb59xf,_0xcb59x10){return FaxRoom[_0x34e3[25]]()[_0x34e3[19]](function(_0xcb59x14){return _0xcb59x10[_0x34e3[18]](200)[_0x34e3[17]](_0xcb59x14)})[_0x34e3[16]](function(_0xcb59x12){return handleError(_0xcb59x10,_0xcb59x12)})};function getFaxQueues(_0xcb59x16){return function(){switch(_0xcb59x16[_0x34e3[31]]){case _0x34e3[30]:return User[_0x34e3[29]](_0xcb59x16[_0x34e3[26]],{attributes:[_0x34e3[26]]})[_0x34e3[19]](Util[_0x34e3[28]]({},{attributes:[_0x34e3[26]]}))[_0x34e3[19]](function(_0xcb59x17){return {include:{model:FaxAccount,include:{model:FaxApplication,include:{model:FaxQueue,where:{id:_[_0x34e3[27]](_0xcb59x17,_0x34e3[26])}}}}}});default:return {}}}}exports[_0x34e3[32]]= function(_0xcb59xf,_0xcb59x10){return Promise[_0x34e3[39]]([])[_0x34e3[19]](getFaxQueues(_0xcb59xf[_0x34e3[30]]))[_0x34e3[19]](function(_0xcb59x19){return FaxRoom[_0x34e3[38]](_[_0x34e3[37]](Util[_0x34e3[21]](_0xcb59xf[_0x34e3[20]],{status:_0x34e3[34],updatedAt:{$gte:moment()[_0x34e3[36]](_0x34e3[35])}}),_0xcb59x19))})[_0x34e3[19]](function(_0xcb59x18){return _0xcb59x10[_0x34e3[18]](200)[_0x34e3[17]]({value:_0xcb59x18})})[_0x34e3[16]](function(_0xcb59x12){console[_0x34e3[33]](_0xcb59x12);return handleError(_0xcb59x10,_0xcb59x12)})};exports[_0x34e3[40]]= function(_0xcb59xf,_0xcb59x10){return Promise[_0x34e3[39]]([])[_0x34e3[19]](getFaxQueues(_0xcb59xf[_0x34e3[30]]))[_0x34e3[19]](function(_0xcb59x19){return FaxRoom[_0x34e3[38]](_[_0x34e3[37]](Util[_0x34e3[21]](_0xcb59xf[_0x34e3[20]],{status:_0x34e3[41],updatedAt:{$gte:moment()[_0x34e3[36]](_0x34e3[35])}}),_0xcb59x19))})[_0x34e3[19]](function(_0xcb59x18){return _0xcb59x10[_0x34e3[18]](200)[_0x34e3[17]]({value:_0xcb59x18})})[_0x34e3[16]](function(_0xcb59x12){console[_0x34e3[33]](_0xcb59x12);return handleError(_0xcb59x10,_0xcb59x12)})};exports[_0x34e3[42]]= function(_0xcb59xf,_0xcb59x10){return Promise[_0x34e3[39]]([])[_0x34e3[19]](getFaxQueues(_0xcb59xf[_0x34e3[30]]))[_0x34e3[19]](function(_0xcb59x19){return FaxRoom[_0x34e3[38]](_[_0x34e3[37]](Util[_0x34e3[21]](_0xcb59xf[_0x34e3[20]],{status:_0x34e3[43],updatedAt:{$gte:moment()[_0x34e3[36]](_0x34e3[35])}}),_0xcb59x19))})[_0x34e3[19]](function(_0xcb59x18){return _0xcb59x10[_0x34e3[18]](200)[_0x34e3[17]]({value:_0xcb59x18})})[_0x34e3[16]](function(_0xcb59x12){console[_0x34e3[33]](_0xcb59x12);return handleError(_0xcb59x10,_0xcb59x12)})};exports[_0x34e3[44]]= function(_0xcb59xf,_0xcb59x10){return Promise[_0x34e3[39]]([])[_0x34e3[19]](getFaxQueues(_0xcb59xf[_0x34e3[30]]))[_0x34e3[19]](function(_0xcb59x19){return FaxRoom[_0x34e3[38]](_[_0x34e3[37]](Util[_0x34e3[21]](_0xcb59xf[_0x34e3[20]],{status:_0x34e3[45],updatedAt:{$gte:moment()[_0x34e3[36]](_0x34e3[35])}}),_0xcb59x19))})[_0x34e3[19]](function(_0xcb59x18){return _0xcb59x10[_0x34e3[18]](200)[_0x34e3[17]]({value:_0xcb59x18})})[_0x34e3[16]](function(_0xcb59x12){console[_0x34e3[33]](_0xcb59x12);return handleError(_0xcb59x10,_0xcb59x12)})};exports[_0x34e3[46]]= function(_0xcb59xf,_0xcb59x10,_0xcb59x11){switch(_0xcb59xf[_0x34e3[30]][_0x34e3[31]]){case _0x34e3[52]:return sequelize[_0x34e3[20]](_0x34e3[48],{replacements:{status:_0x34e3[49],id:_0xcb59xf[_0x34e3[30]][_0x34e3[26]]},type:sequelize[_0x34e3[51]][_0x34e3[50]]})[_0x34e3[19]](function(_0xcb59x13){return _0xcb59x10[_0x34e3[18]](200)[_0x34e3[17]](_0xcb59x13)})[_0x34e3[16]](function(_0xcb59x12){console[_0x34e3[47]](_0xcb59x12);return handleError(_0xcb59x10,_0xcb59x12)});default:return sequelize[_0x34e3[20]](_0x34e3[53],{replacements:{status:_0x34e3[49],id:_0xcb59xf[_0x34e3[30]][_0x34e3[26]]},type:sequelize[_0x34e3[51]][_0x34e3[50]]})[_0x34e3[19]](function(_0xcb59x13){return _0xcb59x10[_0x34e3[18]](200)[_0x34e3[17]](_0xcb59x13)})[_0x34e3[16]](function(_0xcb59x12){return handleError(_0xcb59x10,_0xcb59x12)})}};exports[_0x34e3[54]]= function(_0xcb59xf,_0xcb59x10,_0xcb59x11){return FaxRoom[_0x34e3[56]]({where:{UserId:_0xcb59xf[_0x34e3[55]][_0x34e3[26]]},include:[{all:true}]})[_0x34e3[19]](function(_0xcb59x1a){return _0xcb59x10[_0x34e3[18]](200)[_0x34e3[17]](_0xcb59x1a)})[_0x34e3[16]](function(_0xcb59x12){return handleError(_0xcb59x10,_0xcb59x12)})};exports[_0x34e3[57]]= function(_0xcb59xf,_0xcb59x10,_0xcb59x11){var _0xcb59x1b;if(_0xcb59xf[_0x34e3[30]][_0x34e3[31]]=== _0x34e3[52]){return FaxRoom[_0x34e3[29]](_0xcb59xf[_0x34e3[55]][_0x34e3[26]])[_0x34e3[19]](function(_0xcb59x1c){_0xcb59x1b= _0xcb59x1c;if(!_0xcb59x1b){return _0xcb59x10[_0x34e3[58]](404)};return _0xcb59x1b[_0x34e3[60]]({status:_0x34e3[43]},{userId:_0xcb59xf[_0x34e3[30]][_0x34e3[26]]})})[_0x34e3[19]](function(){return _0xcb59x1b[_0x34e3[59]](_0xcb59xf[_0x34e3[30]][_0x34e3[26]])})[_0x34e3[19]](function(){return _0xcb59x10[_0x34e3[58]](200)})[_0x34e3[16]](function(_0xcb59x12){return handleError(_0xcb59x10,_0xcb59x12)})}};exports[_0x34e3[61]]= function(_0xcb59xf,_0xcb59x10,_0xcb59x11){return FaxRoom[_0x34e3[24]](_0x34e3[23])[_0x34e3[29]](_0xcb59xf[_0x34e3[55]][_0x34e3[26]])[_0x34e3[19]](function(_0xcb59x1c){if(!_0xcb59x1c){return _0xcb59x10[_0x34e3[58]](404)};return _0xcb59x10[_0x34e3[17]](_0xcb59x1c)})[_0x34e3[16]](function(_0xcb59x12){console[_0x34e3[47]](_0xcb59x12);return handleError(_0xcb59x10,_0xcb59x12)})};exports[_0x34e3[62]]= function(_0xcb59xf,_0xcb59x10,_0xcb59x11){return FaxRoom[_0x34e3[29]](_0xcb59xf[_0x34e3[55]][_0x34e3[26]])[_0x34e3[19]](function(_0xcb59x1c){if(!_0xcb59x1c){return _0xcb59x10[_0x34e3[58]](404)};return _0xcb59x1c[_0x34e3[67]]({attributes:[_0x34e3[26],_0x34e3[63],_0x34e3[64],_0x34e3[65],_0x34e3[31],_0x34e3[66]]})})[_0x34e3[19]](function(_0xcb59x1d){return _0xcb59x10[_0x34e3[17]](_0xcb59x1d)})[_0x34e3[16]](function(_0xcb59x12){return handleError(_0xcb59x10,_0xcb59x12)})};exports[_0x34e3[68]]= function(_0xcb59xf,_0xcb59x10,_0xcb59x11){return FaxRoom[_0x34e3[68]](_0xcb59xf[_0x34e3[69]])[_0x34e3[19]](function(_0xcb59x1c){return _0xcb59x10[_0x34e3[18]](201)[_0x34e3[17]](_0xcb59x1c)})[_0x34e3[16]](function(_0xcb59x12){return handleError(_0xcb59x10,_0xcb59x12)})};exports[_0x34e3[70]]= function(_0xcb59xf,_0xcb59x10,_0xcb59x11){_0xcb59xf[_0x34e3[69]][_0x34e3[71]]= _0xcb59xf[_0x34e3[30]][_0x34e3[26]];_0xcb59xf[_0x34e3[69]][_0x34e3[72]]= _0xcb59xf[_0x34e3[55]][_0x34e3[26]];_0xcb59xf[_0x34e3[69]][_0x34e3[73]]= _0xcb59xf[_0x34e3[69]][_0x34e3[73]];return FaxMessage[_0x34e3[68]](_0xcb59xf[_0x34e3[69]],{include:[{model:FaxAttachment}],user:_0xcb59xf[_0x34e3[30]]})[_0x34e3[19]](function(_0xcb59x1e){return _0xcb59x10[_0x34e3[18]](201)[_0x34e3[17]](_0xcb59x1e)})[_0x34e3[16]](function(_0xcb59x12){return handleError(_0xcb59x10,_0xcb59x12)})};exports[_0x34e3[60]]= function(_0xcb59xf,_0xcb59x10,_0xcb59x11){return FaxRoom[_0x34e3[29]](_0xcb59xf[_0x34e3[55]][_0x34e3[26]])[_0x34e3[19]](function(_0xcb59x1c){if(!_0xcb59x1c){return _0xcb59x10[_0x34e3[58]](404)};if(_0xcb59x1c[_0x34e3[74]]){throw  new Error(_0x34e3[75])};var _0xcb59x1f=_[_0x34e3[37]](_0xcb59x1c,_0xcb59xf[_0x34e3[69]]);return _0xcb59x1f[_0x34e3[76]]()})[_0x34e3[19]](function(_0xcb59x1c){return _0xcb59x10[_0x34e3[18]](200)[_0x34e3[17]](_0xcb59x1c)})[_0x34e3[16]](function(_0xcb59x12){return handleError(_0xcb59x10,_0xcb59x12)})};exports[_0x34e3[77]]= function(_0xcb59xf,_0xcb59x10,_0xcb59x11){return FaxRoom[_0x34e3[29]](_0xcb59xf[_0x34e3[55]][_0x34e3[26]])[_0x34e3[19]](function(_0xcb59x1c){if(!_0xcb59x1c){return _0xcb59x10[_0x34e3[58]](404)};return _0xcb59x1c[_0x34e3[79]](_0xcb59xf[_0x34e3[69]][_0x34e3[78]],{individualHooks:true})})[_0x34e3[19]](function(){return _0xcb59x10[_0x34e3[58]](200)})[_0x34e3[16]](function(_0xcb59x12){return handleError(_0xcb59x10,_0xcb59x12)})};exports[_0x34e3[80]]= function(_0xcb59xf,_0xcb59x10,_0xcb59x11){return FaxRoom[_0x34e3[29]](_0xcb59xf[_0x34e3[55]][_0x34e3[26]])[_0x34e3[19]](function(_0xcb59x1c){if(!_0xcb59x1c){return _0xcb59x10[_0x34e3[58]](404)};return _0xcb59x1c[_0x34e3[80]]()})[_0x34e3[19]](function(){return _0xcb59x10[_0x34e3[58]](204)})[_0x34e3[16]](function(_0xcb59x12){return handleError(_0xcb59x10,_0xcb59x12)})};exports[_0x34e3[81]]= function(_0xcb59xf,_0xcb59x10){return FaxRoom[_0x34e3[80]]({where:{id:_0xcb59xf[_0x34e3[20]][_0x34e3[82]]},individualHooks:true})[_0x34e3[19]](function(){return _0xcb59x10[_0x34e3[58]](200)})[_0x34e3[16]](function(_0xcb59x12){return handleError(_0xcb59x10,_0xcb59x12)})};function handleError(_0xcb59x10,_0xcb59x12){return _0xcb59x10[_0x34e3[18]](500)[_0x34e3[17]](_0xcb59x12)}exports[_0x34e3[83]]= function(_0xcb59xf,_0xcb59x10,_0xcb59x11){var _0xcb59x21={where:{id:_0xcb59xf[_0x34e3[55]][_0x34e3[26]][_0x34e3[85]](_0x34e3[84])},user:_0xcb59xf[_0x34e3[30]],individualHooks:true};return FaxRoom[_0x34e3[60]](_0xcb59xf[_0x34e3[69]],_0xcb59x21)[_0x34e3[19]](function(_0xcb59x22){if(!_0xcb59x22){return _0xcb59x10[_0x34e3[58]](404)};return _0xcb59x22})[_0x34e3[19]](function(_0xcb59x22){return _0xcb59x10[_0x34e3[58]](200)})[_0x34e3[16]](function(_0xcb59x12){return handleError(_0xcb59x10,_0xcb59x12)})};exports[_0x34e3[86]]= function(_0xcb59xf,_0xcb59x10,_0xcb59x11){return FaxMessage[_0x34e3[29]](_0xcb59xf[_0x34e3[55]][_0x34e3[26]])[_0x34e3[19]](function(_0xcb59x1e){return _0xcb59x1e[_0x34e3[87]]({include:[{model:FaxAccount},{model:FaxMessage,include:[{model:FaxAttachment},{model:User,attributes:[_0x34e3[26],_0x34e3[63],_0x34e3[64],_0x34e3[65]]}]},{model:User,attributes:[_0x34e3[26],_0x34e3[63],_0x34e3[64],_0x34e3[65]]}]})})[_0x34e3[19]](function(_0xcb59x1c){return _0xcb59x10[_0x34e3[17]](_0xcb59x1c)})[_0x34e3[16]](function(_0xcb59x12){return handleError(_0xcb59x10,_0xcb59x12)})}