Built motion from commit 70c527640.|1.0.24
[motion.git] / server / api / voice_queue / voice_queue.controller.js
index 741fd41..5fc9e0b 100644 (file)
@@ -1 +1 @@
-var _0x2fbc=["\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","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\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\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x6C\x6F\x67","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x72\x6F\x6C\x65","\x67\x65\x74\x52\x65\x61\x6C\x74\x69\x6D\x65\x51\x75\x65\x75\x65\x73","\x72\x65\x61\x6C\x74\x69\x6D\x65\x51\x75\x65\x75\x65\x4D\x65\x6D\x62\x65\x72\x73","\x61\x6D\x69","\x6C\x6F\x63\x61\x6C\x73","\x61\x70\x70","\x72\x6F\x77\x73","\x6E\x61\x6D\x65","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x6D\x65\x72\x67\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x61\x67\x65\x6E\x74","\x67\x65\x74\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x70\x75\x73\x68","\x50\x52\x49\x4D\x41\x52\x59","\x70\x61\x74\x68","\x65\x72\x72\x6F\x72\x73","\x20\x6D\x75\x73\x74\x20\x62\x65\x20\x75\x6E\x69\x71\x75\x65","\x6D\x65\x73\x73\x61\x67\x65","\x6A\x6F\x69\x6E","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x51\x55\x45\x55\x45","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x53\x49\x50\x2F\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x70\x65\x6E\x61\x6C\x74\x79","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x61\x67\x65\x6E\x74\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x61\x6C\x6C","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x2fbc[0];var _=require(_0x2fbc[1]);var util=require(_0x2fbc[2]);var Util=require(_0x2fbc[3]);var sequelize=require(_0x2fbc[5])[_0x2fbc[4]];var User=require(_0x2fbc[5])[_0x2fbc[6]];var VoiceQueue=require(_0x2fbc[5])[_0x2fbc[7]];var UserHasVoiceQueue=require(_0x2fbc[5])[_0x2fbc[8]];var VoiceExtension=require(_0x2fbc[5])[_0x2fbc[9]];exports[_0x2fbc[10]]= function(_0x579ax9,_0x579axa){switch(_0x579ax9[_0x2fbc[18]][_0x2fbc[23]]){case _0x2fbc[18]:return User[_0x2fbc[19]](_0x579ax9[_0x2fbc[18]][_0x2fbc[17]],{attributes:[_0x2fbc[17]]})[_0x2fbc[14]](Util[_0x2fbc[16]](_0x579ax9[_0x2fbc[15]]))[_0x2fbc[14]](function(_0x579axc){_0x579axa[_0x2fbc[13]](200)[_0x2fbc[12]](_0x579axc)})[_0x2fbc[11]](function(_0x579axb){return handleError(_0x579axa,_0x579axb)});default:return VoiceQueue[_0x2fbc[22]](Util[_0x2fbc[21]](_0x579ax9[_0x2fbc[15]]))[_0x2fbc[14]](function(_0x579axc){_0x579axa[_0x2fbc[13]](200)[_0x2fbc[12]](_0x579axc)})[_0x2fbc[11]](function(_0x579axb){console[_0x2fbc[20]](_0x579axb);return handleError(_0x579axa,_0x579axb)})}};exports[_0x2fbc[24]]= function(_0x579ax9,_0x579axa,_0x579axd){var _0x579axe;switch(_0x579ax9[_0x2fbc[18]][_0x2fbc[23]]){case _0x2fbc[18]:var _0x579axf=[];return User[_0x2fbc[19]](_0x579ax9[_0x2fbc[18]][_0x2fbc[17]],{attributes:[_0x2fbc[17]]})[_0x2fbc[14]](Util[_0x2fbc[16]]({},{attributes:[_0x2fbc[30]],include:[{raw:true,model:User,attributes:[_0x2fbc[17]]}]}))[_0x2fbc[14]](function(_0x579ax10){_0x579axe= _[_0x2fbc[31]](_0x579ax10[_0x2fbc[29]],_0x2fbc[30]);_0x579ax10[_0x2fbc[29]][_0x2fbc[33]](function(_0x579ax11){_0x579axf= _[_0x2fbc[32]](_0x579axf,_[_0x2fbc[31]](_0x579ax11.Users,_0x2fbc[17]))});return VoiceQueue[_0x2fbc[22]](_[_0x2fbc[34]](Util[_0x2fbc[21]](_0x579ax9[_0x2fbc[15]],{name:_0x579axe}),{include:[{model:User,where:{id:_0x579axf},required:false}]}))})[_0x2fbc[14]](function(_0x579axc){_0x579ax9[_0x2fbc[28]][_0x2fbc[27]][_0x2fbc[26]][_0x2fbc[12]]({message:_0x2fbc[25],queues:_0x579axe});return _0x579axa[_0x2fbc[13]](200)[_0x2fbc[12]](_0x579axc)})[_0x2fbc[11]](function(_0x579axb){console[_0x2fbc[20]](_0x579axb);return handleError(_0x579axa,_0x579axb)});default:return VoiceQueue[_0x2fbc[22]](_[_0x2fbc[34]](Util[_0x2fbc[21]](_0x579ax9[_0x2fbc[15]]),{include:[{model:User,required:false}]}))[_0x2fbc[14]](function(_0x579axc){_0x579axe= _[_0x2fbc[31]](_0x579axc[_0x2fbc[29]],_0x2fbc[30]);_0x579ax9[_0x2fbc[28]][_0x2fbc[27]][_0x2fbc[26]][_0x2fbc[12]]({message:_0x2fbc[25],queues:_0x579axe});return _0x579axa[_0x2fbc[13]](200)[_0x2fbc[12]](_0x579axc)})[_0x2fbc[11]](function(_0x579axb){console[_0x2fbc[20]](_0x579axb);return handleError(_0x579axa,_0x579axb)})}};exports[_0x2fbc[35]]= function(_0x579ax9,_0x579axa){return VoiceQueue[_0x2fbc[19]](_0x579ax9[_0x2fbc[37]][_0x2fbc[30]])[_0x2fbc[14]](function(_0x579ax12){if(!_0x579ax12){return _0x579axa[_0x2fbc[36]](404)};return _0x579axa[_0x2fbc[12]](_0x579ax12)})[_0x2fbc[11]](function(_0x579axb){return handleError(_0x579axa,_0x579axb)})};exports[_0x2fbc[38]]= function(_0x579ax9,_0x579axa){return VoiceQueue[_0x2fbc[19]](_0x579ax9[_0x2fbc[37]][_0x2fbc[30]])[_0x2fbc[14]](function(_0x579ax11){if(!_0x579ax11){return _0x579axa[_0x2fbc[36]](404)};return _0x579ax11[_0x2fbc[41]]({where:{role:_0x2fbc[40]}})})[_0x2fbc[14]](function(_0x579axf){return _0x579axa[_0x2fbc[13]](200)[_0x2fbc[12]]({rows:_0x579axf,count:_0x579axf[_0x2fbc[39]]})})[_0x2fbc[11]](function(_0x579axb){return handleError(_0x579axa,_0x579axb)})};exports[_0x2fbc[42]]= function(_0x579ax9,_0x579axa){var _0x579ax13;return VoiceQueue[_0x2fbc[42]](_0x579ax9[_0x2fbc[52]])[_0x2fbc[14]](function(_0x579ax12){_0x579ax13= _0x579ax12})[_0x2fbc[14]](addAgents(_0x579ax9,_0x579ax9[_0x2fbc[52]][_0x2fbc[30]]))[_0x2fbc[14]](function(){return _0x579axa[_0x2fbc[13]](201)[_0x2fbc[12]](_0x579ax13)})[_0x2fbc[11]](sequelize.UniqueConstraintError,function(_0x579axb){var _0x579ax14=[];_0x579axb[_0x2fbc[46]][_0x2fbc[33]](function(_0x579ax15){switch(_0x579ax15[_0x2fbc[45]]){case _0x2fbc[44]:_0x579ax14[_0x2fbc[43]](_0x2fbc[30]);break;default:_0x579ax14[_0x2fbc[43]](_0x579ax15[_0x2fbc[45]])}});_0x579ax14[_0x2fbc[43]](_0x2fbc[47]);_0x579axb[_0x2fbc[48]]= _0x579ax14[_0x2fbc[49]]();_0x579axb[_0x2fbc[50]]= _0x2fbc[51];return _0x579axa[_0x2fbc[13]](500)[_0x2fbc[12]](_0x579axb)})[_0x2fbc[11]](function(_0x579axb){return handleError(_0x579axa,_0x579axb)})};exports[_0x2fbc[53]]= function(_0x579ax9,_0x579axa){if(_0x579ax9[_0x2fbc[52]][_0x2fbc[30]]){delete _0x579ax9[_0x2fbc[52]][_0x2fbc[30]]};return VoiceQueue[_0x2fbc[19]](_0x579ax9[_0x2fbc[37]][_0x2fbc[30]])[_0x2fbc[14]](function(_0x579ax12){if(!_0x579ax12){return _0x579axa[_0x2fbc[36]](404)};var _0x579ax16=_[_0x2fbc[34]](_0x579ax12,_0x579ax9[_0x2fbc[52]]);return _0x579ax16[_0x2fbc[54]]()})[_0x2fbc[14]](function(_0x579ax12){return _0x579axa[_0x2fbc[13]](200)[_0x2fbc[12]](_0x579ax12)})[_0x2fbc[11]](function(_0x579axb){console[_0x2fbc[20]](_0x579axb);return handleError(_0x579axa,_0x579axb)})};function addAgents(_0x579ax9,_0x579ax11){return function(){return User[_0x2fbc[60]]({where:{id:_0x579ax9[_0x2fbc[52]][_0x2fbc[59]]},raw:true})[_0x2fbc[14]](function(_0x579ax18){var _0x579ax19=_[_0x2fbc[31]](_0x579ax18,function(_0x579ax1a){return {queue:_0x579ax11,interface:util[_0x2fbc[56]](_0x2fbc[55],_0x579ax1a[_0x2fbc[30]]),stateinterface:util[_0x2fbc[56]](_0x2fbc[55],_0x579ax1a[_0x2fbc[30]]),membername:_0x579ax1a[_0x2fbc[30]],UserId:_0x579ax1a[_0x2fbc[17]],penalty:_0x579ax9[_0x2fbc[52]][_0x2fbc[57]]}});return UserHasVoiceQueue[_0x2fbc[58]](_0x579ax19,{individualHooks:true})})}}exports[_0x2fbc[61]]= function(_0x579ax9,_0x579axa,_0x579axd){return Promise[_0x2fbc[62]]([])[_0x2fbc[14]](addAgents(_0x579ax9,_0x579ax9[_0x2fbc[37]][_0x2fbc[30]]))[_0x2fbc[14]](function(){return _0x579axa[_0x2fbc[36]](200)})[_0x2fbc[11]](function(_0x579axb){console[_0x2fbc[20]](_0x579axb);return _0x579axd(_0x579axb)})};exports[_0x2fbc[63]]= function(_0x579ax9,_0x579axa,_0x579axd){return UserHasVoiceQueue[_0x2fbc[64]]({where:{UserId:_0x579ax9[_0x2fbc[15]][_0x2fbc[59]],queue:_0x579ax9[_0x2fbc[37]][_0x2fbc[30]]},individualHooks:true})[_0x2fbc[14]](function(){return _0x579axa[_0x2fbc[36]](202)})[_0x2fbc[11]](function(_0x579axb){return _0x579axd(_0x579axb)})};exports[_0x2fbc[64]]= function(_0x579ax9,_0x579axa){return VoiceQueue[_0x2fbc[64]]({where:{name:_0x579ax9[_0x2fbc[37]][_0x2fbc[30]]},individualHooks:true})[_0x2fbc[14]](function(){return _0x579axa[_0x2fbc[36]](204)})[_0x2fbc[11]](function(_0x579axb){return handleError(_0x579axa,_0x579axb)})};exports[_0x2fbc[65]]= function(_0x579ax9,_0x579axa){return VoiceQueue[_0x2fbc[64]]({where:{name:_0x579ax9[_0x2fbc[15]][_0x2fbc[66]]},individualHooks:true})[_0x2fbc[14]](function(){return _0x579axa[_0x2fbc[36]](204)})[_0x2fbc[11]](function(_0x579axb){return handleError(_0x579axa,_0x579axb)})};function handleError(_0x579axa,_0x579axb){return _0x579axa[_0x2fbc[13]](500)[_0x2fbc[12]](_0x579axb)}
\ No newline at end of file
+var _0x7816=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\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","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\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\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x72\x6F\x6C\x65","\x67\x65\x74\x52\x65\x61\x6C\x74\x69\x6D\x65\x51\x75\x65\x75\x65\x73","\x72\x65\x61\x6C\x74\x69\x6D\x65\x51\x75\x65\x75\x65\x4D\x65\x6D\x62\x65\x72\x73","\x61\x6D\x69","\x6C\x6F\x63\x61\x6C\x73","\x61\x70\x70","\x72\x6F\x77\x73","\x6E\x61\x6D\x65","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x6D\x65\x72\x67\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x61\x67\x65\x6E\x74","\x67\x65\x74\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x70\x75\x73\x68","\x50\x52\x49\x4D\x41\x52\x59","\x70\x61\x74\x68","\x65\x72\x72\x6F\x72\x73","\x20\x6D\x75\x73\x74\x20\x62\x65\x20\x75\x6E\x69\x71\x75\x65","\x6D\x65\x73\x73\x61\x67\x65","\x6A\x6F\x69\x6E","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x51\x55\x45\x55\x45","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x53\x49\x50\x2F\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x70\x65\x6E\x61\x6C\x74\x79","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x61\x67\x65\x6E\x74\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x61\x6C\x6C","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72"];_0x7816[0];var _=require(_0x7816[1]);var logger=require(_0x7816[3])(_0x7816[2]);var util=require(_0x7816[4]);var Util=require(_0x7816[5]);var sequelize=require(_0x7816[7])[_0x7816[6]];var User=require(_0x7816[7])[_0x7816[8]];var VoiceQueue=require(_0x7816[7])[_0x7816[9]];var UserHasVoiceQueue=require(_0x7816[7])[_0x7816[10]];var VoiceExtension=require(_0x7816[7])[_0x7816[11]];exports[_0x7816[12]]= function(_0x1577xa,_0x1577xb){switch(_0x1577xa[_0x7816[20]][_0x7816[24]]){case _0x7816[20]:return User[_0x7816[21]](_0x1577xa[_0x7816[20]][_0x7816[19]],{attributes:[_0x7816[19]]})[_0x7816[16]](Util[_0x7816[18]](_0x1577xa[_0x7816[17]]))[_0x7816[16]](function(_0x1577xd){_0x1577xb[_0x7816[15]](200)[_0x7816[14]](_0x1577xd)})[_0x7816[13]](function(_0x1577xc){return handleError(_0x1577xb,_0x1577xc)});default:return VoiceQueue[_0x7816[23]](Util[_0x7816[22]](_0x1577xa[_0x7816[17]]))[_0x7816[16]](function(_0x1577xd){_0x1577xb[_0x7816[15]](200)[_0x7816[14]](_0x1577xd)})[_0x7816[13]](function(_0x1577xc){return handleError(_0x1577xb,_0x1577xc)})}};exports[_0x7816[25]]= function(_0x1577xa,_0x1577xb,_0x1577xe){var _0x1577xf;switch(_0x1577xa[_0x7816[20]][_0x7816[24]]){case _0x7816[20]:var _0x1577x10=[];return User[_0x7816[21]](_0x1577xa[_0x7816[20]][_0x7816[19]],{attributes:[_0x7816[19]]})[_0x7816[16]](Util[_0x7816[18]]({},{attributes:[_0x7816[31]],include:[{raw:true,model:User,attributes:[_0x7816[19]]}]}))[_0x7816[16]](function(_0x1577x11){_0x1577xf= _[_0x7816[32]](_0x1577x11[_0x7816[30]],_0x7816[31]);_0x1577x11[_0x7816[30]][_0x7816[34]](function(_0x1577x12){_0x1577x10= _[_0x7816[33]](_0x1577x10,_[_0x7816[32]](_0x1577x12.Users,_0x7816[19]))});return VoiceQueue[_0x7816[23]](_[_0x7816[35]](Util[_0x7816[22]](_0x1577xa[_0x7816[17]],{name:_0x1577xf}),{include:[{model:User,where:{id:_0x1577x10},required:false}]}))})[_0x7816[16]](function(_0x1577xd){_0x1577xa[_0x7816[29]][_0x7816[28]][_0x7816[27]][_0x7816[14]]({message:_0x7816[26],queues:_0x1577xf});return _0x1577xb[_0x7816[15]](200)[_0x7816[14]](_0x1577xd)})[_0x7816[13]](function(_0x1577xc){return handleError(_0x1577xb,_0x1577xc)});default:return VoiceQueue[_0x7816[23]](_[_0x7816[35]](Util[_0x7816[22]](_0x1577xa[_0x7816[17]]),{include:[{model:User,required:false}]}))[_0x7816[16]](function(_0x1577xd){_0x1577xf= _[_0x7816[32]](_0x1577xd[_0x7816[30]],_0x7816[31]);_0x1577xa[_0x7816[29]][_0x7816[28]][_0x7816[27]][_0x7816[14]]({message:_0x7816[26],queues:_0x1577xf});return _0x1577xb[_0x7816[15]](200)[_0x7816[14]](_0x1577xd)})[_0x7816[13]](function(_0x1577xc){return handleError(_0x1577xb,_0x1577xc)})}};exports[_0x7816[36]]= function(_0x1577xa,_0x1577xb){return VoiceQueue[_0x7816[21]](_0x1577xa[_0x7816[38]][_0x7816[31]])[_0x7816[16]](function(_0x1577x13){if(!_0x1577x13){return _0x1577xb[_0x7816[37]](404)};return _0x1577xb[_0x7816[14]](_0x1577x13)})[_0x7816[13]](function(_0x1577xc){return handleError(_0x1577xb,_0x1577xc)})};exports[_0x7816[39]]= function(_0x1577xa,_0x1577xb){return VoiceQueue[_0x7816[21]](_0x1577xa[_0x7816[38]][_0x7816[31]])[_0x7816[16]](function(_0x1577x12){if(!_0x1577x12){return _0x1577xb[_0x7816[37]](404)};return _0x1577x12[_0x7816[42]]({where:{role:_0x7816[41]}})})[_0x7816[16]](function(_0x1577x10){return _0x1577xb[_0x7816[15]](200)[_0x7816[14]]({rows:_0x1577x10,count:_0x1577x10[_0x7816[40]]})})[_0x7816[13]](function(_0x1577xc){return handleError(_0x1577xb,_0x1577xc)})};exports[_0x7816[43]]= function(_0x1577xa,_0x1577xb){var _0x1577x14;return VoiceQueue[_0x7816[43]](_0x1577xa[_0x7816[53]])[_0x7816[16]](function(_0x1577x13){_0x1577x14= _0x1577x13})[_0x7816[16]](addAgents(_0x1577xa,_0x1577xa[_0x7816[53]][_0x7816[31]]))[_0x7816[16]](function(){return _0x1577xb[_0x7816[15]](201)[_0x7816[14]](_0x1577x14)})[_0x7816[13]](sequelize.UniqueConstraintError,function(_0x1577xc){var _0x1577x15=[];_0x1577xc[_0x7816[47]][_0x7816[34]](function(_0x1577x16){switch(_0x1577x16[_0x7816[46]]){case _0x7816[45]:_0x1577x15[_0x7816[44]](_0x7816[31]);break;default:_0x1577x15[_0x7816[44]](_0x1577x16[_0x7816[46]])}});_0x1577x15[_0x7816[44]](_0x7816[48]);_0x1577xc[_0x7816[49]]= _0x1577x15[_0x7816[50]]();_0x1577xc[_0x7816[51]]= _0x7816[52];return _0x1577xb[_0x7816[15]](500)[_0x7816[14]](_0x1577xc)})[_0x7816[13]](function(_0x1577xc){return handleError(_0x1577xb,_0x1577xc)})};exports[_0x7816[54]]= function(_0x1577xa,_0x1577xb){if(_0x1577xa[_0x7816[53]][_0x7816[31]]){delete _0x1577xa[_0x7816[53]][_0x7816[31]]};return VoiceQueue[_0x7816[21]](_0x1577xa[_0x7816[38]][_0x7816[31]])[_0x7816[16]](function(_0x1577x13){if(!_0x1577x13){return _0x1577xb[_0x7816[37]](404)};var _0x1577x17=_[_0x7816[35]](_0x1577x13,_0x1577xa[_0x7816[53]]);return _0x1577x17[_0x7816[55]]()})[_0x7816[16]](function(_0x1577x13){return _0x1577xb[_0x7816[15]](200)[_0x7816[14]](_0x1577x13)})[_0x7816[13]](function(_0x1577xc){return handleError(_0x1577xb,_0x1577xc)})};function addAgents(_0x1577xa,_0x1577x12){return function(){return User[_0x7816[61]]({where:{id:_0x1577xa[_0x7816[53]][_0x7816[60]]},raw:true})[_0x7816[16]](function(_0x1577x19){var _0x1577x1a=_[_0x7816[32]](_0x1577x19,function(_0x1577x1b){return {queue:_0x1577x12,interface:util[_0x7816[57]](_0x7816[56],_0x1577x1b[_0x7816[31]]),stateinterface:util[_0x7816[57]](_0x7816[56],_0x1577x1b[_0x7816[31]]),membername:_0x1577x1b[_0x7816[31]],UserId:_0x1577x1b[_0x7816[19]],penalty:_0x1577xa[_0x7816[53]][_0x7816[58]]}});return UserHasVoiceQueue[_0x7816[59]](_0x1577x1a,{individualHooks:true})})}}exports[_0x7816[62]]= function(_0x1577xa,_0x1577xb,_0x1577xe){return Promise[_0x7816[63]]([])[_0x7816[16]](addAgents(_0x1577xa,_0x1577xa[_0x7816[38]][_0x7816[31]]))[_0x7816[16]](function(){return _0x1577xb[_0x7816[37]](200)})[_0x7816[13]](function(_0x1577xc){return handleError(_0x1577xb,_0x1577xc)})};exports[_0x7816[64]]= function(_0x1577xa,_0x1577xb,_0x1577xe){return UserHasVoiceQueue[_0x7816[65]]({where:{UserId:_0x1577xa[_0x7816[17]][_0x7816[60]],queue:_0x1577xa[_0x7816[38]][_0x7816[31]]},individualHooks:true})[_0x7816[16]](function(){return _0x1577xb[_0x7816[37]](202)})[_0x7816[13]](function(_0x1577xc){return _0x1577xe(_0x1577xc)})};exports[_0x7816[65]]= function(_0x1577xa,_0x1577xb){return VoiceQueue[_0x7816[65]]({where:{name:_0x1577xa[_0x7816[38]][_0x7816[31]]},individualHooks:true})[_0x7816[16]](function(){return _0x1577xb[_0x7816[37]](204)})[_0x7816[13]](function(_0x1577xc){return handleError(_0x1577xb,_0x1577xc)})};exports[_0x7816[66]]= function(_0x1577xa,_0x1577xb){return VoiceQueue[_0x7816[65]]({where:{name:_0x1577xa[_0x7816[17]][_0x7816[67]]},individualHooks:true})[_0x7816[16]](function(){return _0x1577xb[_0x7816[37]](204)})[_0x7816[13]](function(_0x1577xc){return handleError(_0x1577xb,_0x1577xc)})};function handleError(_0x1577xb,_0x1577xc){logger[_0x7816[69]](_0x1577xc[_0x7816[68]]);return _0x1577xb[_0x7816[15]](500)[_0x7816[14]](_0x1577xc)}
\ No newline at end of file