Built motion from commit 0dbf6b8.|0.0.131
[motion.git] / server / api / openchannel_account / openchannel_account.controller.js
index 8ce80e8..f035c4e 100644 (file)
@@ -1 +1 @@
-var _0x8a86=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x55\x73\x65\x72","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x43\x6F\x6E\x74\x61\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\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","\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\x42\x79\x49\x64","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6E\x61\x6D\x65","\x6F\x6E\x6C\x69\x6E\x65","\x6D\x65\x72\x67\x65","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x55\x73\x65\x72\x49\x64","\x75\x73\x65\x72","\x72\x65\x63\x65\x69\x76\x65\x4D\x65\x73\x73\x61\x67\x65","\x6C\x6F\x67","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D\x49\x64","\x52\x45\x43\x45\x49\x56\x45\x44","\x43\x4C\x4F\x53\x45\x44","\x66\x72\x6F\x6D","\x4E\x45\x57","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x4F\x50\x45\x4E","\x73\x79\x73\x74\x65\x6D","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x41\x63\x63\x6F\x75\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x52\x65\x63\x65\x69\x76\x65\x64\x20\x6D\x65\x73\x73\x61\x67\x65\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x63\x6F\x6E\x74\x61\x69\x6E\x20\x73\x65\x6E\x64\x65\x72\x20\x49\x64","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x44\x45\x53\x43","\x66\x69\x6E\x64\x41\x6C\x6C","\x75\x70\x64\x61\x74\x65","\x20\x20\x20\x65\x72\x72","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x64\x69\x73\x70\x49\x64","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x70\x72\x69\x6F\x72\x69\x74\x79","\x66\x6F\x72\x45\x61\x63\x68","\x72\x65\x71\x20\x61\x70\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x61\x70\x70\x49\x64","\x64\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x69\x64\x73","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D\x73","\x63\x6F\x6E\x74\x61\x63\x74","\x74\x61\x67\x73","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x6C\x61\x73\x74\x45\x76\x65\x6E\x74","\x69\x73\x41\x72\x72\x61\x79","\x25","\x70\x75\x73\x68","\x24\x61\x6E\x64","\x77\x68\x65\x72\x65","\x69\x6E\x63\x6C\x75\x64\x65","\x65\x72\x72\x6F\x72","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64","\x6D\x61\x70","\x71\x75\x65\x75\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x49\x64","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x72\x6F\x6C\x65"];_0x8a86[0];var _=require(_0x8a86[1]);var Util=require(_0x8a86[2]);var OpenchannelAccount=require(_0x8a86[4])[_0x8a86[3]];var sequelize=require(_0x8a86[4])[_0x8a86[5]];var User=require(_0x8a86[4])[_0x8a86[6]];var OpenchannelQueue=require(_0x8a86[4])[_0x8a86[7]];var OpenchannelApplication=require(_0x8a86[4])[_0x8a86[8]];var OpenchannelMessage=require(_0x8a86[4])[_0x8a86[9]];var OpenchannelRoom=require(_0x8a86[4])[_0x8a86[10]];var OpenchannelDisposition=require(_0x8a86[4])[_0x8a86[11]];var Contact=require(_0x8a86[4])[_0x8a86[12]];var Promise=require(_0x8a86[13]);var moment=require(_0x8a86[14]);function handleError(_0xbfdaxf,_0xbfdax10){return _0xbfdaxf[_0x8a86[16]](500)[_0x8a86[15]](_0xbfdax10)}exports[_0x8a86[17]]= function(_0xbfdax11,_0xbfdaxf){return OpenchannelAccount[_0x8a86[22]](Util[_0x8a86[21]](_0xbfdax11[_0x8a86[20]]))[_0x8a86[19]](function(_0xbfdax12){_0xbfdaxf[_0x8a86[16]](200)[_0x8a86[15]](_0xbfdax12)})[_0x8a86[18]](function(_0xbfdax10){return handleError(_0xbfdaxf,_0xbfdax10)})};exports[_0x8a86[23]]= function(_0xbfdax11,_0xbfdaxf){return OpenchannelAccount[_0x8a86[27]](_0xbfdax11[_0x8a86[26]][_0x8a86[25]])[_0x8a86[19]](function(_0xbfdax13){if(!_0xbfdax13){return _0xbfdaxf[_0x8a86[24]](404)};return _0xbfdaxf[_0x8a86[15]](_0xbfdax13)})[_0x8a86[18]](function(_0xbfdax10){return handleError(_0xbfdaxf,_0xbfdax10)})};exports[_0x8a86[28]]= function(_0xbfdax11,_0xbfdaxf,_0xbfdax14){return OpenchannelAccount[_0x8a86[27]](_0xbfdax11[_0x8a86[26]][_0x8a86[25]])[_0x8a86[19]](function(_0xbfdax13){if(!_0xbfdax13){return _0xbfdaxf[_0x8a86[24]](404)};return _0xbfdax13[_0x8a86[30]]()})[_0x8a86[19]](function(_0xbfdax15){return _0xbfdaxf[_0x8a86[16]](200)[_0x8a86[15]]({rows:_0xbfdax15,count:_0xbfdax15[_0x8a86[29]]})})[_0x8a86[18]](function(_0xbfdax10){return handleError(_0xbfdaxf,_0xbfdax10)})};exports[_0x8a86[31]]= function(_0xbfdax11,_0xbfdaxf,_0xbfdax14){return OpenchannelAccount[_0x8a86[37]](_0x8a86[36])[_0x8a86[27]](_0xbfdax11[_0x8a86[26]][_0x8a86[25]])[_0x8a86[19]](function(_0xbfdax13){if(!_0xbfdax13){return _0xbfdaxf[_0x8a86[24]](404)};return _0xbfdax13[_0x8a86[35]](_[_0x8a86[34]](Util[_0x8a86[21]](_0xbfdax11[_0x8a86[20]]),{include:[{model:OpenchannelQueue,attributes:[_0x8a86[25],_0x8a86[32]]},{model:User,attributes:[_0x8a86[25],_0x8a86[32],_0x8a86[33]]}]}))})[_0x8a86[19]](function(_0xbfdax16){return _0xbfdaxf[_0x8a86[15]]({count:_0xbfdax16[_0x8a86[29]],rows:_0xbfdax16})})[_0x8a86[18]](function(_0xbfdax10){return handleError(_0xbfdaxf,_0xbfdax10)})};exports[_0x8a86[38]]= function(_0xbfdax11,_0xbfdaxf){return OpenchannelAccount[_0x8a86[38]](_0xbfdax11[_0x8a86[41]])[_0x8a86[19]](function(_0xbfdax13){return _0xbfdaxf[_0x8a86[16]](201)[_0x8a86[15]](_0xbfdax13)})[_0x8a86[18]](sequelize.UniqueConstraintError,function(_0xbfdax10){return Util[_0x8a86[40]][_0x8a86[39]](_0xbfdaxf,_0xbfdax10)})[_0x8a86[18]](function(_0xbfdax10){return handleError(_0xbfdaxf,_0xbfdax10)})};exports[_0x8a86[42]]= function(_0xbfdax11,_0xbfdaxf,_0xbfdax14){_0xbfdax11[_0x8a86[41]][_0x8a86[43]]= _0xbfdax11[_0x8a86[26]][_0x8a86[25]];return OpenchannelDisposition[_0x8a86[38]](_0xbfdax11[_0x8a86[41]])[_0x8a86[19]](function(_0xbfdax17){return _0xbfdaxf[_0x8a86[16]](201)[_0x8a86[15]](_0xbfdax17)})[_0x8a86[18]](function(_0xbfdax10){return handleError(_0xbfdaxf,_0xbfdax10)})};exports[_0x8a86[44]]= function(_0xbfdax11,_0xbfdaxf,_0xbfdax14){_0xbfdax11[_0x8a86[41]][_0x8a86[43]]= _0xbfdax11[_0x8a86[26]][_0x8a86[25]];_0xbfdax11[_0x8a86[41]][_0x8a86[45]]= _0xbfdax11[_0x8a86[46]][_0x8a86[25]];return OpenchannelMessage[_0x8a86[38]](_0xbfdax11[_0x8a86[41]],{user:_0xbfdax11[_0x8a86[46]]})[_0x8a86[19]](function(_0xbfdax18){return _0xbfdaxf[_0x8a86[16]](201)[_0x8a86[15]](_0xbfdax18)})[_0x8a86[18]](function(_0xbfdax10){return handleError(_0xbfdaxf,_0xbfdax10)})};exports[_0x8a86[47]]= function(_0xbfdax11,_0xbfdaxf,_0xbfdax14){if(_0xbfdax11[_0x8a86[41]][_0x8a86[25]]){delete _0xbfdax11[_0x8a86[41]][_0x8a86[25]]};var _0xbfdax19=_0xbfdax11[_0x8a86[41]];var _0xbfdax1a;return OpenchannelAccount[_0x8a86[27]](_0xbfdax11[_0x8a86[26]][_0x8a86[25]])[_0x8a86[19]](function(_0xbfdax13){if(!_0xbfdax13){throw  new Error(_0x8a86[60])};_0xbfdax1a= _0xbfdax13;console[_0x8a86[48]](_0xbfdax19);if(!_0xbfdax19[_0x8a86[52]]){throw  new Error(_0x8a86[61])};return OpenchannelRoom[_0x8a86[64]]({limit:1,where:{contact:_0xbfdax19[_0x8a86[52]],OpenchannelAccountId:_0xbfdax1a[_0x8a86[25]]},order:[[_0x8a86[62],_0x8a86[63]]]})})[_0x8a86[19]](function(_0xbfdax1d){var _0xbfdax1c=_0xbfdax1d[0];if(!_0xbfdax1c|| _0xbfdax1c[_0x8a86[16]]== _0x8a86[51]){var _0xbfdax1e=_0xbfdax1c?_0xbfdax1c[_0x8a86[25]]:null;return OpenchannelRoom[_0x8a86[38]]({contact:_0xbfdax19[_0x8a86[52]],OpenchannelAccountId:_0xbfdax1a[_0x8a86[25]],status:_0x8a86[53],ParentId:_0xbfdax1e,lastEvent:_0x8a86[50],lastEventAt:moment()[_0x8a86[55]](_0x8a86[54]),openchannelIn:1})}else {return _0xbfdax1c[_0x8a86[59]]({lastEvent:_0x8a86[50],lastEventAt:moment()[_0x8a86[55]](_0x8a86[54]),status:_0x8a86[56],openReason:_0x8a86[57],openchannelIn:++_0xbfdax1c[_0x8a86[58]]})}})[_0x8a86[19]](function(_0xbfdax1c){_0xbfdax19[_0x8a86[43]]= _0xbfdax1a[_0x8a86[25]];_0xbfdax19[_0x8a86[49]]= _0xbfdax1c[_0x8a86[25]];_0xbfdax19[_0x8a86[16]]= _0x8a86[50];return OpenchannelMessage[_0x8a86[38]](_0xbfdax19)})[_0x8a86[19]](function(_0xbfdax1b){return _0xbfdaxf[_0x8a86[16]](201)[_0x8a86[15]](_0xbfdax1b)})[_0x8a86[18]](function(_0xbfdax10){console[_0x8a86[48]](_0xbfdax10);return handleError(_0xbfdaxf,_0xbfdax10)})};exports[_0x8a86[65]]= function(_0xbfdax11,_0xbfdaxf){if(_0xbfdax11[_0x8a86[41]][_0x8a86[25]]){delete _0xbfdax11[_0x8a86[41]][_0x8a86[25]]};return OpenchannelAccount[_0x8a86[27]](_0xbfdax11[_0x8a86[26]][_0x8a86[25]])[_0x8a86[19]](function(_0xbfdax13){if(!_0xbfdax13){return _0xbfdaxf[_0x8a86[24]](404)};var _0xbfdax1f=_[_0x8a86[34]](_0xbfdax13,_0xbfdax11[_0x8a86[41]]);return _0xbfdax1f[_0x8a86[67]]()})[_0x8a86[19]](function(_0xbfdax13){return _0xbfdaxf[_0x8a86[16]](200)[_0x8a86[15]](_0xbfdax13)})[_0x8a86[18]](sequelize.UniqueConstraintError,function(_0xbfdax10){return Util[_0x8a86[40]][_0x8a86[39]](_0xbfdaxf,_0xbfdax10)})[_0x8a86[18]](function(_0xbfdax10){console[_0x8a86[48]](_0x8a86[66],_0xbfdax10);return handleError(_0xbfdaxf,_0xbfdax10)})};exports[_0x8a86[68]]= function(_0xbfdax11,_0xbfdaxf){if(_0xbfdax11[_0x8a86[41]][_0x8a86[25]]){delete _0xbfdax11[_0x8a86[41]][_0x8a86[25]]};return OpenchannelDisposition[_0x8a86[27]](_0xbfdax11[_0x8a86[26]][_0x8a86[69]])[_0x8a86[19]](function(_0xbfdax20){if(!_0xbfdax20){return _0xbfdaxf[_0x8a86[24]](404)};var _0xbfdax1f=_[_0x8a86[34]](_0xbfdax20,_0xbfdax11[_0x8a86[41]]);return _0xbfdax1f[_0x8a86[67]]()})[_0x8a86[19]](function(_0xbfdax20){return _0xbfdaxf[_0x8a86[16]](200)[_0x8a86[15]](_0xbfdax20)})[_0x8a86[18]](function(_0xbfdax10){return handleError(_0xbfdaxf,_0xbfdax10)})};exports[_0x8a86[70]]= function(_0xbfdax11,_0xbfdaxf){var _0xbfdax21=0;var _0xbfdax22=_0xbfdax11[_0x8a86[41]];_0xbfdax22[_0x8a86[73]](function(_0xbfdax23){delete _0xbfdax23[_0x8a86[25]];delete _0xbfdax23[_0x8a86[62]];delete _0xbfdax23[_0x8a86[71]];_0xbfdax23[_0x8a86[72]]=  ++_0xbfdax21});console[_0x8a86[48]](_0x8a86[74],_0xbfdax11[_0x8a86[41]]);return sequelize[_0x8a86[77]](function(_0xbfdax25){return OpenchannelApplication[_0x8a86[76]]({where:{OpenchannelAccountId:_0xbfdax11[_0x8a86[26]][_0x8a86[25]]},individualHooks:true,transaction:_0xbfdax25})[_0x8a86[19]](function(_0xbfdax26){return OpenchannelApplication[_0x8a86[75]](_0xbfdax22,{individualHooks:true,transaction:_0xbfdax25})})})[_0x8a86[19]](function(_0xbfdax24){return _0xbfdaxf[_0x8a86[16]](200)[_0x8a86[15]]({count:_0xbfdax24[_0x8a86[29]],rows:_0xbfdax24})})[_0x8a86[18]](function(_0xbfdax10){return handleError(_0xbfdaxf,_0xbfdax10)})};exports[_0x8a86[78]]= function(_0xbfdax11,_0xbfdaxf){if(_0xbfdax11[_0x8a86[41]][_0x8a86[25]]){delete _0xbfdax11[_0x8a86[41]][_0x8a86[25]]};return OpenchannelApplication[_0x8a86[27]](_0xbfdax11[_0x8a86[26]][_0x8a86[79]])[_0x8a86[19]](function(_0xbfdax26){if(!_0xbfdax26){return _0xbfdaxf[_0x8a86[24]](404)};var _0xbfdax1f=_[_0x8a86[34]](_0xbfdax26,_0xbfdax11[_0x8a86[41]]);return _0xbfdax1f[_0x8a86[67]]()})[_0x8a86[19]](function(_0xbfdax26){return _0xbfdaxf[_0x8a86[16]](200)[_0x8a86[15]](_0xbfdax26)})[_0x8a86[18]](function(_0xbfdax10){return handleError(_0xbfdaxf,_0xbfdax10)})};exports[_0x8a86[76]]= function(_0xbfdax11,_0xbfdaxf){return OpenchannelAccount[_0x8a86[27]](_0xbfdax11[_0x8a86[26]][_0x8a86[25]])[_0x8a86[19]](function(_0xbfdax13){if(!_0xbfdax13){return _0xbfdaxf[_0x8a86[24]](404)};return _0xbfdax13[_0x8a86[76]]()})[_0x8a86[19]](function(){return _0xbfdaxf[_0x8a86[24]](204)})[_0x8a86[18]](function(_0xbfdax10){return handleError(_0xbfdaxf,_0xbfdax10)})};exports[_0x8a86[80]]= function(_0xbfdax11,_0xbfdaxf,_0xbfdax14){return OpenchannelApplication[_0x8a86[27]](_0xbfdax11[_0x8a86[26]][_0x8a86[79]])[_0x8a86[19]](function(_0xbfdax26){if(!_0xbfdax26){return _0xbfdaxf[_0x8a86[24]](404)};return _0xbfdax26[_0x8a86[76]]()})[_0x8a86[19]](function(){return _0xbfdaxf[_0x8a86[24]](204)})[_0x8a86[18]](function(_0xbfdax10){return handleError(_0xbfdaxf,_0xbfdax10)})};exports[_0x8a86[81]]= function(_0xbfdax11,_0xbfdaxf,_0xbfdax14){return OpenchannelDisposition[_0x8a86[27]](_0xbfdax11[_0x8a86[26]][_0x8a86[69]])[_0x8a86[19]](function(_0xbfdax17){if(!_0xbfdax17){return _0xbfdaxf[_0x8a86[24]](404)};return _0xbfdax17[_0x8a86[76]]()})[_0x8a86[19]](function(){return _0xbfdaxf[_0x8a86[24]](204)})[_0x8a86[18]](function(_0xbfdax10){return handleError(_0xbfdaxf,_0xbfdax10)})};exports[_0x8a86[82]]= function(_0xbfdax11,_0xbfdaxf){return OpenchannelApplication[_0x8a86[76]]({where:{id:_0xbfdax11[_0x8a86[20]][_0x8a86[83]]},individualHooks:true})[_0x8a86[19]](function(){return _0xbfdaxf[_0x8a86[24]](204)})[_0x8a86[18]](function(_0xbfdax10){return handleError(_0xbfdaxf,_0xbfdax10)})};exports[_0x8a86[84]]= function(_0xbfdax11,_0xbfdaxf,_0xbfdax14){var _0xbfdax27={where:{OpenchannelAccountId:_0xbfdax11[_0x8a86[26]][_0x8a86[25]],$and:[]},attributes:[_0x8a86[25],_0x8a86[85],_0x8a86[71],_0x8a86[86],_0x8a86[87],_0x8a86[88]],include:[]};if(_0xbfdax11[_0x8a86[20]]){if(_0xbfdax11[_0x8a86[20]][_0x8a86[86]]){if(_[_0x8a86[89]](_0xbfdax11[_0x8a86[20]][_0x8a86[86]])){for(var _0xbfdax28=0;_0xbfdax28< _0xbfdax11[_0x8a86[20]][_0x8a86[86]][_0x8a86[29]];_0xbfdax28++){_0xbfdax27[_0x8a86[93]][_0x8a86[92]][_0x8a86[91]]({tags:{$like:_0x8a86[90]+ _0xbfdax11[_0x8a86[20]][_0x8a86[86]][_0xbfdax28]+ _0x8a86[90]}})}}else {_0xbfdax27[_0x8a86[93]][_0x8a86[92]][_0x8a86[91]]({tags:{$like:_0x8a86[90]+ _0xbfdax11[_0x8a86[20]][_0x8a86[86]]+ _0x8a86[90]}})};delete _0xbfdax11[_0x8a86[20]][_0x8a86[86]]};_[_0x8a86[34]](_0xbfdax27[_0x8a86[93]],_0xbfdax11[_0x8a86[20]])};switch(_0xbfdax11[_0x8a86[46]][_0x8a86[103]]){case _0x8a86[96]:_0xbfdax27[_0x8a86[94]][_0x8a86[91]]({model:User,attributes:[_0x8a86[25]]});var _0xbfdax29;var _0xbfdax2a;var _0xbfdax2b;return User[_0x8a86[27]](_0xbfdax11[_0x8a86[46]][_0x8a86[25]])[_0x8a86[19]](function(_0xbfdax2e){console[_0x8a86[48]](_0x8a86[46]);if(_0xbfdax2e){return _0xbfdax2e[_0x8a86[102]]()}else {return []}})[_0x8a86[19]](function(_0xbfdax2d){console[_0x8a86[48]](_0xbfdax2d);_0xbfdax2a= _[_0x8a86[98]](_0xbfdax2d,_0x8a86[25]);return OpenchannelAccount[_0x8a86[27]](_0xbfdax11[_0x8a86[26]][_0x8a86[25]])})[_0x8a86[19]](function(_0xbfdax12){return _0xbfdax12[_0x8a86[35]]({where:{$or:[{app:_0x8a86[99]},{app:_0x8a86[96]}]}})})[_0x8a86[19]](function(_0xbfdax22){_0xbfdax29= _[_0x8a86[98]](_[_0x8a86[97]](_0xbfdax22,{"\x61\x70\x70":_0x8a86[96]}),_0x8a86[45]);_0xbfdax2b= _[_0x8a86[98]](_[_0x8a86[97]](_0xbfdax22,{"\x61\x70\x70":_0x8a86[99]}),_0x8a86[100]);if(_[_0x8a86[101]](_0xbfdax2a,_0xbfdax2b)[_0x8a86[29]]|| _[_0x8a86[101]](_0xbfdax29,[_0xbfdax11[_0x8a86[46]][_0x8a86[25]]])[_0x8a86[29]]){return OpenchannelRoom[_0x8a86[64]](_0xbfdax27)[_0x8a86[19]](function(_0xbfdax2c){return _0xbfdaxf[_0x8a86[16]](200)[_0x8a86[15]](_0xbfdax2c)})[_0x8a86[18]](function(_0xbfdax10){console[_0x8a86[95]](_0xbfdax10);return handleError(_0xbfdaxf,_0xbfdax10)})}else {return _0xbfdaxf[_0x8a86[16]](200)[_0x8a86[15]]([])}})[_0x8a86[18]](function(_0xbfdax10){console[_0x8a86[95]](_0xbfdax10)});default:return OpenchannelRoom[_0x8a86[64]](_0xbfdax27)[_0x8a86[19]](function(_0xbfdax2c){return _0xbfdaxf[_0x8a86[16]](200)[_0x8a86[15]](_0xbfdax2c)})[_0x8a86[18]](function(_0xbfdax10){return handleError(_0xbfdaxf,_0xbfdax10)})}}
\ No newline at end of file
+var _0xb599=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x55\x73\x65\x72","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x43\x6F\x6E\x74\x61\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\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","\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\x42\x79\x49\x64","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6E\x61\x6D\x65","\x6F\x6E\x6C\x69\x6E\x65","\x6D\x65\x72\x67\x65","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x55\x73\x65\x72\x49\x64","\x75\x73\x65\x72","\x72\x65\x63\x65\x69\x76\x65\x4D\x65\x73\x73\x61\x67\x65","\x6C\x6F\x67","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D\x49\x64","\x52\x45\x43\x45\x49\x56\x45\x44","\x43\x4C\x4F\x53\x45\x44","\x66\x72\x6F\x6D","\x4E\x45\x57","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x4F\x50\x45\x4E","\x73\x79\x73\x74\x65\x6D","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x41\x63\x63\x6F\x75\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x52\x65\x63\x65\x69\x76\x65\x64\x20\x6D\x65\x73\x73\x61\x67\x65\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x63\x6F\x6E\x74\x61\x69\x6E\x20\x73\x65\x6E\x64\x65\x72\x20\x49\x64","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x44\x45\x53\x43","\x66\x69\x6E\x64\x41\x6C\x6C","\x75\x70\x64\x61\x74\x65","\x20\x20\x20\x65\x72\x72","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x64\x69\x73\x70\x49\x64","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x70\x72\x69\x6F\x72\x69\x74\x79","\x66\x6F\x72\x45\x61\x63\x68","\x72\x65\x71\x20\x61\x70\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x61\x70\x70\x49\x64","\x64\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x69\x64\x73","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D\x73","\x63\x6F\x6E\x74\x61\x63\x74","\x74\x61\x67\x73","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x6C\x61\x73\x74\x45\x76\x65\x6E\x74","\x69\x73\x41\x72\x72\x61\x79","\x25","\x70\x75\x73\x68","\x24\x61\x6E\x64","\x77\x68\x65\x72\x65","\x69\x6E\x63\x6C\x75\x64\x65","\x65\x72\x72\x6F\x72","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64","\x6D\x61\x70","\x71\x75\x65\x75\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x49\x64","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x72\x6F\x6C\x65"];_0xb599[0];var _=require(_0xb599[1]);var Util=require(_0xb599[2]);var OpenchannelAccount=require(_0xb599[4])[_0xb599[3]];var sequelize=require(_0xb599[4])[_0xb599[5]];var User=require(_0xb599[4])[_0xb599[6]];var OpenchannelQueue=require(_0xb599[4])[_0xb599[7]];var OpenchannelApplication=require(_0xb599[4])[_0xb599[8]];var OpenchannelMessage=require(_0xb599[4])[_0xb599[9]];var OpenchannelRoom=require(_0xb599[4])[_0xb599[10]];var OpenchannelDisposition=require(_0xb599[4])[_0xb599[11]];var Contact=require(_0xb599[4])[_0xb599[12]];var Promise=require(_0xb599[13]);var moment=require(_0xb599[14]);function handleError(_0x9726xf,_0x9726x10){return _0x9726xf[_0xb599[16]](500)[_0xb599[15]](_0x9726x10)}exports[_0xb599[17]]= function(_0x9726x11,_0x9726xf){return OpenchannelAccount[_0xb599[22]](Util[_0xb599[21]](_0x9726x11[_0xb599[20]]))[_0xb599[19]](function(_0x9726x12){_0x9726xf[_0xb599[16]](200)[_0xb599[15]](_0x9726x12)})[_0xb599[18]](function(_0x9726x10){return handleError(_0x9726xf,_0x9726x10)})};exports[_0xb599[23]]= function(_0x9726x11,_0x9726xf){return OpenchannelAccount[_0xb599[27]](_0x9726x11[_0xb599[26]][_0xb599[25]])[_0xb599[19]](function(_0x9726x13){if(!_0x9726x13){return _0x9726xf[_0xb599[24]](404)};return _0x9726xf[_0xb599[15]](_0x9726x13)})[_0xb599[18]](function(_0x9726x10){return handleError(_0x9726xf,_0x9726x10)})};exports[_0xb599[28]]= function(_0x9726x11,_0x9726xf,_0x9726x14){return OpenchannelAccount[_0xb599[27]](_0x9726x11[_0xb599[26]][_0xb599[25]])[_0xb599[19]](function(_0x9726x13){if(!_0x9726x13){return _0x9726xf[_0xb599[24]](404)};return _0x9726x13[_0xb599[30]]()})[_0xb599[19]](function(_0x9726x15){return _0x9726xf[_0xb599[16]](200)[_0xb599[15]]({rows:_0x9726x15,count:_0x9726x15[_0xb599[29]]})})[_0xb599[18]](function(_0x9726x10){return handleError(_0x9726xf,_0x9726x10)})};exports[_0xb599[31]]= function(_0x9726x11,_0x9726xf,_0x9726x14){return OpenchannelAccount[_0xb599[37]](_0xb599[36])[_0xb599[27]](_0x9726x11[_0xb599[26]][_0xb599[25]])[_0xb599[19]](function(_0x9726x13){if(!_0x9726x13){return _0x9726xf[_0xb599[24]](404)};return _0x9726x13[_0xb599[35]](_[_0xb599[34]](Util[_0xb599[21]](_0x9726x11[_0xb599[20]]),{include:[{model:OpenchannelQueue,attributes:[_0xb599[25],_0xb599[32]]},{model:User,attributes:[_0xb599[25],_0xb599[32],_0xb599[33]]}]}))})[_0xb599[19]](function(_0x9726x16){return _0x9726xf[_0xb599[15]]({count:_0x9726x16[_0xb599[29]],rows:_0x9726x16})})[_0xb599[18]](function(_0x9726x10){return handleError(_0x9726xf,_0x9726x10)})};exports[_0xb599[38]]= function(_0x9726x11,_0x9726xf){return OpenchannelAccount[_0xb599[38]](_0x9726x11[_0xb599[41]])[_0xb599[19]](function(_0x9726x13){return _0x9726xf[_0xb599[16]](201)[_0xb599[15]](_0x9726x13)})[_0xb599[18]](sequelize.UniqueConstraintError,function(_0x9726x10){return Util[_0xb599[40]][_0xb599[39]](_0x9726xf,_0x9726x10)})[_0xb599[18]](function(_0x9726x10){return handleError(_0x9726xf,_0x9726x10)})};exports[_0xb599[42]]= function(_0x9726x11,_0x9726xf,_0x9726x14){_0x9726x11[_0xb599[41]][_0xb599[43]]= _0x9726x11[_0xb599[26]][_0xb599[25]];return OpenchannelDisposition[_0xb599[38]](_0x9726x11[_0xb599[41]])[_0xb599[19]](function(_0x9726x17){return _0x9726xf[_0xb599[16]](201)[_0xb599[15]](_0x9726x17)})[_0xb599[18]](function(_0x9726x10){return handleError(_0x9726xf,_0x9726x10)})};exports[_0xb599[44]]= function(_0x9726x11,_0x9726xf,_0x9726x14){_0x9726x11[_0xb599[41]][_0xb599[43]]= _0x9726x11[_0xb599[26]][_0xb599[25]];_0x9726x11[_0xb599[41]][_0xb599[45]]= _0x9726x11[_0xb599[46]][_0xb599[25]];return OpenchannelMessage[_0xb599[38]](_0x9726x11[_0xb599[41]],{user:_0x9726x11[_0xb599[46]]})[_0xb599[19]](function(_0x9726x18){return _0x9726xf[_0xb599[16]](201)[_0xb599[15]](_0x9726x18)})[_0xb599[18]](function(_0x9726x10){return handleError(_0x9726xf,_0x9726x10)})};exports[_0xb599[47]]= function(_0x9726x11,_0x9726xf,_0x9726x14){if(_0x9726x11[_0xb599[41]][_0xb599[25]]){delete _0x9726x11[_0xb599[41]][_0xb599[25]]};var _0x9726x19=_0x9726x11[_0xb599[41]];var _0x9726x1a;return OpenchannelAccount[_0xb599[27]](_0x9726x11[_0xb599[26]][_0xb599[25]])[_0xb599[19]](function(_0x9726x13){if(!_0x9726x13){throw  new Error(_0xb599[60])};_0x9726x1a= _0x9726x13;console[_0xb599[48]](_0x9726x19);if(!_0x9726x19[_0xb599[52]]){throw  new Error(_0xb599[61])};return OpenchannelRoom[_0xb599[64]]({limit:1,where:{contact:_0x9726x19[_0xb599[52]],OpenchannelAccountId:_0x9726x1a[_0xb599[25]]},order:[[_0xb599[62],_0xb599[63]]]})})[_0xb599[19]](function(_0x9726x1d){var _0x9726x1c=_0x9726x1d[0];if(!_0x9726x1c|| _0x9726x1c[_0xb599[16]]== _0xb599[51]){var _0x9726x1e=_0x9726x1c?_0x9726x1c[_0xb599[25]]:null;return OpenchannelRoom[_0xb599[38]]({contact:_0x9726x19[_0xb599[52]],OpenchannelAccountId:_0x9726x1a[_0xb599[25]],status:_0xb599[53],ParentId:_0x9726x1e,lastEvent:_0xb599[50],lastEventAt:moment()[_0xb599[55]](_0xb599[54]),openchannelIn:1})}else {return _0x9726x1c[_0xb599[59]]({lastEvent:_0xb599[50],lastEventAt:moment()[_0xb599[55]](_0xb599[54]),status:_0xb599[56],openReason:_0xb599[57],openchannelIn:++_0x9726x1c[_0xb599[58]]})}})[_0xb599[19]](function(_0x9726x1c){_0x9726x19[_0xb599[43]]= _0x9726x1a[_0xb599[25]];_0x9726x19[_0xb599[49]]= _0x9726x1c[_0xb599[25]];_0x9726x19[_0xb599[16]]= _0xb599[50];return OpenchannelMessage[_0xb599[38]](_0x9726x19)})[_0xb599[19]](function(_0x9726x1b){return _0x9726xf[_0xb599[16]](201)[_0xb599[15]](_0x9726x1b)})[_0xb599[18]](function(_0x9726x10){console[_0xb599[48]](_0x9726x10);return handleError(_0x9726xf,_0x9726x10)})};exports[_0xb599[65]]= function(_0x9726x11,_0x9726xf){if(_0x9726x11[_0xb599[41]][_0xb599[25]]){delete _0x9726x11[_0xb599[41]][_0xb599[25]]};return OpenchannelAccount[_0xb599[27]](_0x9726x11[_0xb599[26]][_0xb599[25]])[_0xb599[19]](function(_0x9726x13){if(!_0x9726x13){return _0x9726xf[_0xb599[24]](404)};var _0x9726x1f=_[_0xb599[34]](_0x9726x13,_0x9726x11[_0xb599[41]]);return _0x9726x1f[_0xb599[67]]()})[_0xb599[19]](function(_0x9726x13){return _0x9726xf[_0xb599[16]](200)[_0xb599[15]](_0x9726x13)})[_0xb599[18]](sequelize.UniqueConstraintError,function(_0x9726x10){return Util[_0xb599[40]][_0xb599[39]](_0x9726xf,_0x9726x10)})[_0xb599[18]](function(_0x9726x10){console[_0xb599[48]](_0xb599[66],_0x9726x10);return handleError(_0x9726xf,_0x9726x10)})};exports[_0xb599[68]]= function(_0x9726x11,_0x9726xf){if(_0x9726x11[_0xb599[41]][_0xb599[25]]){delete _0x9726x11[_0xb599[41]][_0xb599[25]]};return OpenchannelDisposition[_0xb599[27]](_0x9726x11[_0xb599[26]][_0xb599[69]])[_0xb599[19]](function(_0x9726x20){if(!_0x9726x20){return _0x9726xf[_0xb599[24]](404)};var _0x9726x1f=_[_0xb599[34]](_0x9726x20,_0x9726x11[_0xb599[41]]);return _0x9726x1f[_0xb599[67]]()})[_0xb599[19]](function(_0x9726x20){return _0x9726xf[_0xb599[16]](200)[_0xb599[15]](_0x9726x20)})[_0xb599[18]](function(_0x9726x10){return handleError(_0x9726xf,_0x9726x10)})};exports[_0xb599[70]]= function(_0x9726x11,_0x9726xf){var _0x9726x21=0;var _0x9726x22=_0x9726x11[_0xb599[41]];_0x9726x22[_0xb599[73]](function(_0x9726x23){delete _0x9726x23[_0xb599[25]];delete _0x9726x23[_0xb599[62]];delete _0x9726x23[_0xb599[71]];_0x9726x23[_0xb599[72]]=  ++_0x9726x21});console[_0xb599[48]](_0xb599[74],_0x9726x11[_0xb599[41]]);return sequelize[_0xb599[77]](function(_0x9726x25){return OpenchannelApplication[_0xb599[76]]({where:{OpenchannelAccountId:_0x9726x11[_0xb599[26]][_0xb599[25]]},individualHooks:true,transaction:_0x9726x25})[_0xb599[19]](function(_0x9726x26){return OpenchannelApplication[_0xb599[75]](_0x9726x22,{individualHooks:true,transaction:_0x9726x25})})})[_0xb599[19]](function(_0x9726x24){return _0x9726xf[_0xb599[16]](200)[_0xb599[15]]({count:_0x9726x24[_0xb599[29]],rows:_0x9726x24})})[_0xb599[18]](function(_0x9726x10){return handleError(_0x9726xf,_0x9726x10)})};exports[_0xb599[78]]= function(_0x9726x11,_0x9726xf){if(_0x9726x11[_0xb599[41]][_0xb599[25]]){delete _0x9726x11[_0xb599[41]][_0xb599[25]]};return OpenchannelApplication[_0xb599[27]](_0x9726x11[_0xb599[26]][_0xb599[79]])[_0xb599[19]](function(_0x9726x26){if(!_0x9726x26){return _0x9726xf[_0xb599[24]](404)};var _0x9726x1f=_[_0xb599[34]](_0x9726x26,_0x9726x11[_0xb599[41]]);return _0x9726x1f[_0xb599[67]]()})[_0xb599[19]](function(_0x9726x26){return _0x9726xf[_0xb599[16]](200)[_0xb599[15]](_0x9726x26)})[_0xb599[18]](function(_0x9726x10){return handleError(_0x9726xf,_0x9726x10)})};exports[_0xb599[76]]= function(_0x9726x11,_0x9726xf){return OpenchannelAccount[_0xb599[27]](_0x9726x11[_0xb599[26]][_0xb599[25]])[_0xb599[19]](function(_0x9726x13){if(!_0x9726x13){return _0x9726xf[_0xb599[24]](404)};return _0x9726x13[_0xb599[76]]()})[_0xb599[19]](function(){return _0x9726xf[_0xb599[24]](204)})[_0xb599[18]](function(_0x9726x10){return handleError(_0x9726xf,_0x9726x10)})};exports[_0xb599[80]]= function(_0x9726x11,_0x9726xf,_0x9726x14){return OpenchannelApplication[_0xb599[27]](_0x9726x11[_0xb599[26]][_0xb599[79]])[_0xb599[19]](function(_0x9726x26){if(!_0x9726x26){return _0x9726xf[_0xb599[24]](404)};return _0x9726x26[_0xb599[76]]()})[_0xb599[19]](function(){return _0x9726xf[_0xb599[24]](204)})[_0xb599[18]](function(_0x9726x10){return handleError(_0x9726xf,_0x9726x10)})};exports[_0xb599[81]]= function(_0x9726x11,_0x9726xf,_0x9726x14){return OpenchannelDisposition[_0xb599[27]](_0x9726x11[_0xb599[26]][_0xb599[69]])[_0xb599[19]](function(_0x9726x17){if(!_0x9726x17){return _0x9726xf[_0xb599[24]](404)};return _0x9726x17[_0xb599[76]]()})[_0xb599[19]](function(){return _0x9726xf[_0xb599[24]](204)})[_0xb599[18]](function(_0x9726x10){return handleError(_0x9726xf,_0x9726x10)})};exports[_0xb599[82]]= function(_0x9726x11,_0x9726xf){return OpenchannelApplication[_0xb599[76]]({where:{id:_0x9726x11[_0xb599[20]][_0xb599[83]]},individualHooks:true})[_0xb599[19]](function(){return _0x9726xf[_0xb599[24]](204)})[_0xb599[18]](function(_0x9726x10){return handleError(_0x9726xf,_0x9726x10)})};exports[_0xb599[84]]= function(_0x9726x11,_0x9726xf,_0x9726x14){var _0x9726x27={where:{OpenchannelAccountId:_0x9726x11[_0xb599[26]][_0xb599[25]],$and:[]},attributes:[_0xb599[25],_0xb599[85],_0xb599[71],_0xb599[86],_0xb599[87],_0xb599[88]],include:[]};if(_0x9726x11[_0xb599[20]]){if(_0x9726x11[_0xb599[20]][_0xb599[86]]){if(_[_0xb599[89]](_0x9726x11[_0xb599[20]][_0xb599[86]])){for(var _0x9726x28=0;_0x9726x28< _0x9726x11[_0xb599[20]][_0xb599[86]][_0xb599[29]];_0x9726x28++){_0x9726x27[_0xb599[93]][_0xb599[92]][_0xb599[91]]({tags:{$like:_0xb599[90]+ _0x9726x11[_0xb599[20]][_0xb599[86]][_0x9726x28]+ _0xb599[90]}})}}else {_0x9726x27[_0xb599[93]][_0xb599[92]][_0xb599[91]]({tags:{$like:_0xb599[90]+ _0x9726x11[_0xb599[20]][_0xb599[86]]+ _0xb599[90]}})};delete _0x9726x11[_0xb599[20]][_0xb599[86]]};_[_0xb599[34]](_0x9726x27[_0xb599[93]],_0x9726x11[_0xb599[20]])};switch(_0x9726x11[_0xb599[46]][_0xb599[103]]){case _0xb599[96]:_0x9726x27[_0xb599[94]][_0xb599[91]]({model:User,attributes:[_0xb599[25]]});var _0x9726x29;var _0x9726x2a;var _0x9726x2b;return User[_0xb599[27]](_0x9726x11[_0xb599[46]][_0xb599[25]])[_0xb599[19]](function(_0x9726x2e){console[_0xb599[48]](_0xb599[46]);if(_0x9726x2e){return _0x9726x2e[_0xb599[102]]()}else {return []}})[_0xb599[19]](function(_0x9726x2d){console[_0xb599[48]](_0x9726x2d);_0x9726x2a= _[_0xb599[98]](_0x9726x2d,_0xb599[25]);return OpenchannelAccount[_0xb599[27]](_0x9726x11[_0xb599[26]][_0xb599[25]])})[_0xb599[19]](function(_0x9726x12){return _0x9726x12[_0xb599[35]]({where:{$or:[{app:_0xb599[99]},{app:_0xb599[96]}]}})})[_0xb599[19]](function(_0x9726x22){_0x9726x29= _[_0xb599[98]](_[_0xb599[97]](_0x9726x22,{"\x61\x70\x70":_0xb599[96]}),_0xb599[45]);_0x9726x2b= _[_0xb599[98]](_[_0xb599[97]](_0x9726x22,{"\x61\x70\x70":_0xb599[99]}),_0xb599[100]);if(_[_0xb599[101]](_0x9726x2a,_0x9726x2b)[_0xb599[29]]|| _[_0xb599[101]](_0x9726x29,[_0x9726x11[_0xb599[46]][_0xb599[25]]])[_0xb599[29]]){return OpenchannelRoom[_0xb599[64]](_0x9726x27)[_0xb599[19]](function(_0x9726x2c){return _0x9726xf[_0xb599[16]](200)[_0xb599[15]](_0x9726x2c)})[_0xb599[18]](function(_0x9726x10){console[_0xb599[95]](_0x9726x10);return handleError(_0x9726xf,_0x9726x10)})}else {return _0x9726xf[_0xb599[16]](200)[_0xb599[15]]([])}})[_0xb599[18]](function(_0x9726x10){console[_0xb599[95]](_0x9726x10)});default:return OpenchannelRoom[_0xb599[64]](_0x9726x27)[_0xb599[19]](function(_0x9726x2c){return _0x9726xf[_0xb599[16]](200)[_0xb599[15]](_0x9726x2c)})[_0xb599[18]](function(_0x9726x10){return handleError(_0x9726xf,_0x9726x10)})}}
\ No newline at end of file