Built motion from commit 832e619.|0.0.137
[motion.git] / server / api / openchannel_account / openchannel_account.controller.js
index 421fc8d..e13c47a 100644 (file)
@@ -1 +1 @@
-var _0x4fe0=["\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"];_0x4fe0[0];var _=require(_0x4fe0[1]);var Util=require(_0x4fe0[2]);var OpenchannelAccount=require(_0x4fe0[4])[_0x4fe0[3]];var sequelize=require(_0x4fe0[4])[_0x4fe0[5]];var User=require(_0x4fe0[4])[_0x4fe0[6]];var OpenchannelQueue=require(_0x4fe0[4])[_0x4fe0[7]];var OpenchannelApplication=require(_0x4fe0[4])[_0x4fe0[8]];var OpenchannelMessage=require(_0x4fe0[4])[_0x4fe0[9]];var OpenchannelRoom=require(_0x4fe0[4])[_0x4fe0[10]];var OpenchannelDisposition=require(_0x4fe0[4])[_0x4fe0[11]];var Contact=require(_0x4fe0[4])[_0x4fe0[12]];var Promise=require(_0x4fe0[13]);var moment=require(_0x4fe0[14]);function handleError(_0xe4dcxf,_0xe4dcx10){return _0xe4dcxf[_0x4fe0[16]](500)[_0x4fe0[15]](_0xe4dcx10)}exports[_0x4fe0[17]]= function(_0xe4dcx11,_0xe4dcxf){return OpenchannelAccount[_0x4fe0[22]](Util[_0x4fe0[21]](_0xe4dcx11[_0x4fe0[20]]))[_0x4fe0[19]](function(_0xe4dcx12){_0xe4dcxf[_0x4fe0[16]](200)[_0x4fe0[15]](_0xe4dcx12)})[_0x4fe0[18]](function(_0xe4dcx10){return handleError(_0xe4dcxf,_0xe4dcx10)})};exports[_0x4fe0[23]]= function(_0xe4dcx11,_0xe4dcxf){return OpenchannelAccount[_0x4fe0[27]](_0xe4dcx11[_0x4fe0[26]][_0x4fe0[25]])[_0x4fe0[19]](function(_0xe4dcx13){if(!_0xe4dcx13){return _0xe4dcxf[_0x4fe0[24]](404)};return _0xe4dcxf[_0x4fe0[15]](_0xe4dcx13)})[_0x4fe0[18]](function(_0xe4dcx10){return handleError(_0xe4dcxf,_0xe4dcx10)})};exports[_0x4fe0[28]]= function(_0xe4dcx11,_0xe4dcxf,_0xe4dcx14){return OpenchannelAccount[_0x4fe0[27]](_0xe4dcx11[_0x4fe0[26]][_0x4fe0[25]])[_0x4fe0[19]](function(_0xe4dcx13){if(!_0xe4dcx13){return _0xe4dcxf[_0x4fe0[24]](404)};return _0xe4dcx13[_0x4fe0[30]]()})[_0x4fe0[19]](function(_0xe4dcx15){return _0xe4dcxf[_0x4fe0[16]](200)[_0x4fe0[15]]({rows:_0xe4dcx15,count:_0xe4dcx15[_0x4fe0[29]]})})[_0x4fe0[18]](function(_0xe4dcx10){return handleError(_0xe4dcxf,_0xe4dcx10)})};exports[_0x4fe0[31]]= function(_0xe4dcx11,_0xe4dcxf,_0xe4dcx14){return OpenchannelAccount[_0x4fe0[37]](_0x4fe0[36])[_0x4fe0[27]](_0xe4dcx11[_0x4fe0[26]][_0x4fe0[25]])[_0x4fe0[19]](function(_0xe4dcx13){if(!_0xe4dcx13){return _0xe4dcxf[_0x4fe0[24]](404)};return _0xe4dcx13[_0x4fe0[35]](_[_0x4fe0[34]](Util[_0x4fe0[21]](_0xe4dcx11[_0x4fe0[20]]),{include:[{model:OpenchannelQueue,attributes:[_0x4fe0[25],_0x4fe0[32]]},{model:User,attributes:[_0x4fe0[25],_0x4fe0[32],_0x4fe0[33]]}]}))})[_0x4fe0[19]](function(_0xe4dcx16){return _0xe4dcxf[_0x4fe0[15]]({count:_0xe4dcx16[_0x4fe0[29]],rows:_0xe4dcx16})})[_0x4fe0[18]](function(_0xe4dcx10){return handleError(_0xe4dcxf,_0xe4dcx10)})};exports[_0x4fe0[38]]= function(_0xe4dcx11,_0xe4dcxf){return OpenchannelAccount[_0x4fe0[38]](_0xe4dcx11[_0x4fe0[41]])[_0x4fe0[19]](function(_0xe4dcx13){return _0xe4dcxf[_0x4fe0[16]](201)[_0x4fe0[15]](_0xe4dcx13)})[_0x4fe0[18]](sequelize.UniqueConstraintError,function(_0xe4dcx10){return Util[_0x4fe0[40]][_0x4fe0[39]](_0xe4dcxf,_0xe4dcx10)})[_0x4fe0[18]](function(_0xe4dcx10){return handleError(_0xe4dcxf,_0xe4dcx10)})};exports[_0x4fe0[42]]= function(_0xe4dcx11,_0xe4dcxf,_0xe4dcx14){_0xe4dcx11[_0x4fe0[41]][_0x4fe0[43]]= _0xe4dcx11[_0x4fe0[26]][_0x4fe0[25]];return OpenchannelDisposition[_0x4fe0[38]](_0xe4dcx11[_0x4fe0[41]])[_0x4fe0[19]](function(_0xe4dcx17){return _0xe4dcxf[_0x4fe0[16]](201)[_0x4fe0[15]](_0xe4dcx17)})[_0x4fe0[18]](function(_0xe4dcx10){return handleError(_0xe4dcxf,_0xe4dcx10)})};exports[_0x4fe0[44]]= function(_0xe4dcx11,_0xe4dcxf,_0xe4dcx14){_0xe4dcx11[_0x4fe0[41]][_0x4fe0[43]]= _0xe4dcx11[_0x4fe0[26]][_0x4fe0[25]];_0xe4dcx11[_0x4fe0[41]][_0x4fe0[45]]= _0xe4dcx11[_0x4fe0[46]][_0x4fe0[25]];return OpenchannelMessage[_0x4fe0[38]](_0xe4dcx11[_0x4fe0[41]],{user:_0xe4dcx11[_0x4fe0[46]]})[_0x4fe0[19]](function(_0xe4dcx18){return _0xe4dcxf[_0x4fe0[16]](201)[_0x4fe0[15]](_0xe4dcx18)})[_0x4fe0[18]](function(_0xe4dcx10){return handleError(_0xe4dcxf,_0xe4dcx10)})};exports[_0x4fe0[47]]= function(_0xe4dcx11,_0xe4dcxf,_0xe4dcx14){if(_0xe4dcx11[_0x4fe0[41]][_0x4fe0[25]]){delete _0xe4dcx11[_0x4fe0[41]][_0x4fe0[25]]};var _0xe4dcx19=_0xe4dcx11[_0x4fe0[41]];var _0xe4dcx1a;return OpenchannelAccount[_0x4fe0[27]](_0xe4dcx11[_0x4fe0[26]][_0x4fe0[25]])[_0x4fe0[19]](function(_0xe4dcx13){if(!_0xe4dcx13){throw  new Error(_0x4fe0[60])};_0xe4dcx1a= _0xe4dcx13;console[_0x4fe0[48]](_0xe4dcx19);if(!_0xe4dcx19[_0x4fe0[52]]){throw  new Error(_0x4fe0[61])};return OpenchannelRoom[_0x4fe0[64]]({limit:1,where:{contact:_0xe4dcx19[_0x4fe0[52]],OpenchannelAccountId:_0xe4dcx1a[_0x4fe0[25]]},order:[[_0x4fe0[62],_0x4fe0[63]]]})})[_0x4fe0[19]](function(_0xe4dcx1d){var _0xe4dcx1c=_0xe4dcx1d[0];if(!_0xe4dcx1c|| _0xe4dcx1c[_0x4fe0[16]]== _0x4fe0[51]){var _0xe4dcx1e=_0xe4dcx1c?_0xe4dcx1c[_0x4fe0[25]]:null;return OpenchannelRoom[_0x4fe0[38]]({contact:_0xe4dcx19[_0x4fe0[52]],OpenchannelAccountId:_0xe4dcx1a[_0x4fe0[25]],status:_0x4fe0[53],ParentId:_0xe4dcx1e,lastEvent:_0x4fe0[50],lastEventAt:moment()[_0x4fe0[55]](_0x4fe0[54]),openchannelIn:1})}else {return _0xe4dcx1c[_0x4fe0[59]]({lastEvent:_0x4fe0[50],lastEventAt:moment()[_0x4fe0[55]](_0x4fe0[54]),status:_0x4fe0[56],openReason:_0x4fe0[57],openchannelIn:++_0xe4dcx1c[_0x4fe0[58]]})}})[_0x4fe0[19]](function(_0xe4dcx1c){_0xe4dcx19[_0x4fe0[43]]= _0xe4dcx1a[_0x4fe0[25]];_0xe4dcx19[_0x4fe0[49]]= _0xe4dcx1c[_0x4fe0[25]];_0xe4dcx19[_0x4fe0[16]]= _0x4fe0[50];return OpenchannelMessage[_0x4fe0[38]](_0xe4dcx19)})[_0x4fe0[19]](function(_0xe4dcx1b){return _0xe4dcxf[_0x4fe0[16]](201)[_0x4fe0[15]](_0xe4dcx1b)})[_0x4fe0[18]](function(_0xe4dcx10){console[_0x4fe0[48]](_0xe4dcx10);return handleError(_0xe4dcxf,_0xe4dcx10)})};exports[_0x4fe0[65]]= function(_0xe4dcx11,_0xe4dcxf){if(_0xe4dcx11[_0x4fe0[41]][_0x4fe0[25]]){delete _0xe4dcx11[_0x4fe0[41]][_0x4fe0[25]]};return OpenchannelAccount[_0x4fe0[27]](_0xe4dcx11[_0x4fe0[26]][_0x4fe0[25]])[_0x4fe0[19]](function(_0xe4dcx13){if(!_0xe4dcx13){return _0xe4dcxf[_0x4fe0[24]](404)};var _0xe4dcx1f=_[_0x4fe0[34]](_0xe4dcx13,_0xe4dcx11[_0x4fe0[41]]);return _0xe4dcx1f[_0x4fe0[67]]()})[_0x4fe0[19]](function(_0xe4dcx13){return _0xe4dcxf[_0x4fe0[16]](200)[_0x4fe0[15]](_0xe4dcx13)})[_0x4fe0[18]](sequelize.UniqueConstraintError,function(_0xe4dcx10){return Util[_0x4fe0[40]][_0x4fe0[39]](_0xe4dcxf,_0xe4dcx10)})[_0x4fe0[18]](function(_0xe4dcx10){console[_0x4fe0[48]](_0x4fe0[66],_0xe4dcx10);return handleError(_0xe4dcxf,_0xe4dcx10)})};exports[_0x4fe0[68]]= function(_0xe4dcx11,_0xe4dcxf){if(_0xe4dcx11[_0x4fe0[41]][_0x4fe0[25]]){delete _0xe4dcx11[_0x4fe0[41]][_0x4fe0[25]]};return OpenchannelDisposition[_0x4fe0[27]](_0xe4dcx11[_0x4fe0[26]][_0x4fe0[69]])[_0x4fe0[19]](function(_0xe4dcx20){if(!_0xe4dcx20){return _0xe4dcxf[_0x4fe0[24]](404)};var _0xe4dcx1f=_[_0x4fe0[34]](_0xe4dcx20,_0xe4dcx11[_0x4fe0[41]]);return _0xe4dcx1f[_0x4fe0[67]]()})[_0x4fe0[19]](function(_0xe4dcx20){return _0xe4dcxf[_0x4fe0[16]](200)[_0x4fe0[15]](_0xe4dcx20)})[_0x4fe0[18]](function(_0xe4dcx10){return handleError(_0xe4dcxf,_0xe4dcx10)})};exports[_0x4fe0[70]]= function(_0xe4dcx11,_0xe4dcxf){var _0xe4dcx21=0;var _0xe4dcx22=_0xe4dcx11[_0x4fe0[41]];_0xe4dcx22[_0x4fe0[73]](function(_0xe4dcx23){delete _0xe4dcx23[_0x4fe0[25]];delete _0xe4dcx23[_0x4fe0[62]];delete _0xe4dcx23[_0x4fe0[71]];_0xe4dcx23[_0x4fe0[72]]=  ++_0xe4dcx21});console[_0x4fe0[48]](_0x4fe0[74],_0xe4dcx11[_0x4fe0[41]]);return sequelize[_0x4fe0[77]](function(_0xe4dcx25){return OpenchannelApplication[_0x4fe0[76]]({where:{OpenchannelAccountId:_0xe4dcx11[_0x4fe0[26]][_0x4fe0[25]]},individualHooks:true,transaction:_0xe4dcx25})[_0x4fe0[19]](function(_0xe4dcx26){return OpenchannelApplication[_0x4fe0[75]](_0xe4dcx22,{individualHooks:true,transaction:_0xe4dcx25})})})[_0x4fe0[19]](function(_0xe4dcx24){return _0xe4dcxf[_0x4fe0[16]](200)[_0x4fe0[15]]({count:_0xe4dcx24[_0x4fe0[29]],rows:_0xe4dcx24})})[_0x4fe0[18]](function(_0xe4dcx10){return handleError(_0xe4dcxf,_0xe4dcx10)})};exports[_0x4fe0[78]]= function(_0xe4dcx11,_0xe4dcxf){if(_0xe4dcx11[_0x4fe0[41]][_0x4fe0[25]]){delete _0xe4dcx11[_0x4fe0[41]][_0x4fe0[25]]};return OpenchannelApplication[_0x4fe0[27]](_0xe4dcx11[_0x4fe0[26]][_0x4fe0[79]])[_0x4fe0[19]](function(_0xe4dcx26){if(!_0xe4dcx26){return _0xe4dcxf[_0x4fe0[24]](404)};var _0xe4dcx1f=_[_0x4fe0[34]](_0xe4dcx26,_0xe4dcx11[_0x4fe0[41]]);return _0xe4dcx1f[_0x4fe0[67]]()})[_0x4fe0[19]](function(_0xe4dcx26){return _0xe4dcxf[_0x4fe0[16]](200)[_0x4fe0[15]](_0xe4dcx26)})[_0x4fe0[18]](function(_0xe4dcx10){return handleError(_0xe4dcxf,_0xe4dcx10)})};exports[_0x4fe0[76]]= function(_0xe4dcx11,_0xe4dcxf){return OpenchannelAccount[_0x4fe0[27]](_0xe4dcx11[_0x4fe0[26]][_0x4fe0[25]])[_0x4fe0[19]](function(_0xe4dcx13){if(!_0xe4dcx13){return _0xe4dcxf[_0x4fe0[24]](404)};return _0xe4dcx13[_0x4fe0[76]]()})[_0x4fe0[19]](function(){return _0xe4dcxf[_0x4fe0[24]](204)})[_0x4fe0[18]](function(_0xe4dcx10){return handleError(_0xe4dcxf,_0xe4dcx10)})};exports[_0x4fe0[80]]= function(_0xe4dcx11,_0xe4dcxf,_0xe4dcx14){return OpenchannelApplication[_0x4fe0[27]](_0xe4dcx11[_0x4fe0[26]][_0x4fe0[79]])[_0x4fe0[19]](function(_0xe4dcx26){if(!_0xe4dcx26){return _0xe4dcxf[_0x4fe0[24]](404)};return _0xe4dcx26[_0x4fe0[76]]()})[_0x4fe0[19]](function(){return _0xe4dcxf[_0x4fe0[24]](204)})[_0x4fe0[18]](function(_0xe4dcx10){return handleError(_0xe4dcxf,_0xe4dcx10)})};exports[_0x4fe0[81]]= function(_0xe4dcx11,_0xe4dcxf,_0xe4dcx14){return OpenchannelDisposition[_0x4fe0[27]](_0xe4dcx11[_0x4fe0[26]][_0x4fe0[69]])[_0x4fe0[19]](function(_0xe4dcx17){if(!_0xe4dcx17){return _0xe4dcxf[_0x4fe0[24]](404)};return _0xe4dcx17[_0x4fe0[76]]()})[_0x4fe0[19]](function(){return _0xe4dcxf[_0x4fe0[24]](204)})[_0x4fe0[18]](function(_0xe4dcx10){return handleError(_0xe4dcxf,_0xe4dcx10)})};exports[_0x4fe0[82]]= function(_0xe4dcx11,_0xe4dcxf){return OpenchannelApplication[_0x4fe0[76]]({where:{id:_0xe4dcx11[_0x4fe0[20]][_0x4fe0[83]]},individualHooks:true})[_0x4fe0[19]](function(){return _0xe4dcxf[_0x4fe0[24]](204)})[_0x4fe0[18]](function(_0xe4dcx10){return handleError(_0xe4dcxf,_0xe4dcx10)})};exports[_0x4fe0[84]]= function(_0xe4dcx11,_0xe4dcxf,_0xe4dcx14){var _0xe4dcx27={where:{OpenchannelAccountId:_0xe4dcx11[_0x4fe0[26]][_0x4fe0[25]],$and:[]},attributes:[_0x4fe0[25],_0x4fe0[85],_0x4fe0[71],_0x4fe0[86],_0x4fe0[87],_0x4fe0[88]],include:[]};if(_0xe4dcx11[_0x4fe0[20]]){if(_0xe4dcx11[_0x4fe0[20]][_0x4fe0[86]]){if(_[_0x4fe0[89]](_0xe4dcx11[_0x4fe0[20]][_0x4fe0[86]])){for(var _0xe4dcx28=0;_0xe4dcx28< _0xe4dcx11[_0x4fe0[20]][_0x4fe0[86]][_0x4fe0[29]];_0xe4dcx28++){_0xe4dcx27[_0x4fe0[93]][_0x4fe0[92]][_0x4fe0[91]]({tags:{$like:_0x4fe0[90]+ _0xe4dcx11[_0x4fe0[20]][_0x4fe0[86]][_0xe4dcx28]+ _0x4fe0[90]}})}}else {_0xe4dcx27[_0x4fe0[93]][_0x4fe0[92]][_0x4fe0[91]]({tags:{$like:_0x4fe0[90]+ _0xe4dcx11[_0x4fe0[20]][_0x4fe0[86]]+ _0x4fe0[90]}})};delete _0xe4dcx11[_0x4fe0[20]][_0x4fe0[86]]};_[_0x4fe0[34]](_0xe4dcx27[_0x4fe0[93]],_0xe4dcx11[_0x4fe0[20]])};switch(_0xe4dcx11[_0x4fe0[46]][_0x4fe0[103]]){case _0x4fe0[96]:_0xe4dcx27[_0x4fe0[94]][_0x4fe0[91]]({model:User,attributes:[_0x4fe0[25]]});var _0xe4dcx29;var _0xe4dcx2a;var _0xe4dcx2b;return User[_0x4fe0[27]](_0xe4dcx11[_0x4fe0[46]][_0x4fe0[25]])[_0x4fe0[19]](function(_0xe4dcx2e){if(_0xe4dcx2e){return _0xe4dcx2e[_0x4fe0[102]]()}else {return []}})[_0x4fe0[19]](function(_0xe4dcx2d){_0xe4dcx2a= _[_0x4fe0[98]](_0xe4dcx2d,_0x4fe0[25]);return OpenchannelAccount[_0x4fe0[27]](_0xe4dcx11[_0x4fe0[26]][_0x4fe0[25]])})[_0x4fe0[19]](function(_0xe4dcx12){return _0xe4dcx12[_0x4fe0[35]]({where:{$or:[{app:_0x4fe0[99]},{app:_0x4fe0[96]}]}})})[_0x4fe0[19]](function(_0xe4dcx22){_0xe4dcx29= _[_0x4fe0[98]](_[_0x4fe0[97]](_0xe4dcx22,{"\x61\x70\x70":_0x4fe0[96]}),_0x4fe0[45]);_0xe4dcx2b= _[_0x4fe0[98]](_[_0x4fe0[97]](_0xe4dcx22,{"\x61\x70\x70":_0x4fe0[99]}),_0x4fe0[100]);if(_[_0x4fe0[101]](_0xe4dcx2a,_0xe4dcx2b)[_0x4fe0[29]]|| _[_0x4fe0[101]](_0xe4dcx29,[_0xe4dcx11[_0x4fe0[46]][_0x4fe0[25]]])[_0x4fe0[29]]){return OpenchannelRoom[_0x4fe0[64]](_0xe4dcx27)[_0x4fe0[19]](function(_0xe4dcx2c){return _0xe4dcxf[_0x4fe0[16]](200)[_0x4fe0[15]](_0xe4dcx2c)})[_0x4fe0[18]](function(_0xe4dcx10){console[_0x4fe0[95]](_0xe4dcx10);return handleError(_0xe4dcxf,_0xe4dcx10)})}else {return _0xe4dcxf[_0x4fe0[16]](200)[_0x4fe0[15]]([])}})[_0x4fe0[18]](function(_0xe4dcx10){console[_0x4fe0[95]](_0xe4dcx10)});default:return OpenchannelRoom[_0x4fe0[64]](_0xe4dcx27)[_0x4fe0[19]](function(_0xe4dcx2c){return _0xe4dcxf[_0x4fe0[16]](200)[_0x4fe0[15]](_0xe4dcx2c)})[_0x4fe0[18]](function(_0xe4dcx10){return handleError(_0xe4dcxf,_0xe4dcx10)})}}
\ No newline at end of file
+var _0xc565=["\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"];_0xc565[0];var _=require(_0xc565[1]);var Util=require(_0xc565[2]);var OpenchannelAccount=require(_0xc565[4])[_0xc565[3]];var sequelize=require(_0xc565[4])[_0xc565[5]];var User=require(_0xc565[4])[_0xc565[6]];var OpenchannelQueue=require(_0xc565[4])[_0xc565[7]];var OpenchannelApplication=require(_0xc565[4])[_0xc565[8]];var OpenchannelMessage=require(_0xc565[4])[_0xc565[9]];var OpenchannelRoom=require(_0xc565[4])[_0xc565[10]];var OpenchannelDisposition=require(_0xc565[4])[_0xc565[11]];var Contact=require(_0xc565[4])[_0xc565[12]];var Promise=require(_0xc565[13]);var moment=require(_0xc565[14]);function handleError(_0x9912xf,_0x9912x10){return _0x9912xf[_0xc565[16]](500)[_0xc565[15]](_0x9912x10)}exports[_0xc565[17]]= function(_0x9912x11,_0x9912xf){return OpenchannelAccount[_0xc565[22]](Util[_0xc565[21]](_0x9912x11[_0xc565[20]]))[_0xc565[19]](function(_0x9912x12){_0x9912xf[_0xc565[16]](200)[_0xc565[15]](_0x9912x12)})[_0xc565[18]](function(_0x9912x10){return handleError(_0x9912xf,_0x9912x10)})};exports[_0xc565[23]]= function(_0x9912x11,_0x9912xf){return OpenchannelAccount[_0xc565[27]](_0x9912x11[_0xc565[26]][_0xc565[25]])[_0xc565[19]](function(_0x9912x13){if(!_0x9912x13){return _0x9912xf[_0xc565[24]](404)};return _0x9912xf[_0xc565[15]](_0x9912x13)})[_0xc565[18]](function(_0x9912x10){return handleError(_0x9912xf,_0x9912x10)})};exports[_0xc565[28]]= function(_0x9912x11,_0x9912xf,_0x9912x14){return OpenchannelAccount[_0xc565[27]](_0x9912x11[_0xc565[26]][_0xc565[25]])[_0xc565[19]](function(_0x9912x13){if(!_0x9912x13){return _0x9912xf[_0xc565[24]](404)};return _0x9912x13[_0xc565[30]]()})[_0xc565[19]](function(_0x9912x15){return _0x9912xf[_0xc565[16]](200)[_0xc565[15]]({rows:_0x9912x15,count:_0x9912x15[_0xc565[29]]})})[_0xc565[18]](function(_0x9912x10){return handleError(_0x9912xf,_0x9912x10)})};exports[_0xc565[31]]= function(_0x9912x11,_0x9912xf,_0x9912x14){return OpenchannelAccount[_0xc565[37]](_0xc565[36])[_0xc565[27]](_0x9912x11[_0xc565[26]][_0xc565[25]])[_0xc565[19]](function(_0x9912x13){if(!_0x9912x13){return _0x9912xf[_0xc565[24]](404)};return _0x9912x13[_0xc565[35]](_[_0xc565[34]](Util[_0xc565[21]](_0x9912x11[_0xc565[20]]),{include:[{model:OpenchannelQueue,attributes:[_0xc565[25],_0xc565[32]]},{model:User,attributes:[_0xc565[25],_0xc565[32],_0xc565[33]]}]}))})[_0xc565[19]](function(_0x9912x16){return _0x9912xf[_0xc565[15]]({count:_0x9912x16[_0xc565[29]],rows:_0x9912x16})})[_0xc565[18]](function(_0x9912x10){return handleError(_0x9912xf,_0x9912x10)})};exports[_0xc565[38]]= function(_0x9912x11,_0x9912xf){return OpenchannelAccount[_0xc565[38]](_0x9912x11[_0xc565[41]])[_0xc565[19]](function(_0x9912x13){return _0x9912xf[_0xc565[16]](201)[_0xc565[15]](_0x9912x13)})[_0xc565[18]](sequelize.UniqueConstraintError,function(_0x9912x10){return Util[_0xc565[40]][_0xc565[39]](_0x9912xf,_0x9912x10)})[_0xc565[18]](function(_0x9912x10){return handleError(_0x9912xf,_0x9912x10)})};exports[_0xc565[42]]= function(_0x9912x11,_0x9912xf,_0x9912x14){_0x9912x11[_0xc565[41]][_0xc565[43]]= _0x9912x11[_0xc565[26]][_0xc565[25]];return OpenchannelDisposition[_0xc565[38]](_0x9912x11[_0xc565[41]])[_0xc565[19]](function(_0x9912x17){return _0x9912xf[_0xc565[16]](201)[_0xc565[15]](_0x9912x17)})[_0xc565[18]](function(_0x9912x10){return handleError(_0x9912xf,_0x9912x10)})};exports[_0xc565[44]]= function(_0x9912x11,_0x9912xf,_0x9912x14){_0x9912x11[_0xc565[41]][_0xc565[43]]= _0x9912x11[_0xc565[26]][_0xc565[25]];_0x9912x11[_0xc565[41]][_0xc565[45]]= _0x9912x11[_0xc565[46]][_0xc565[25]];return OpenchannelMessage[_0xc565[38]](_0x9912x11[_0xc565[41]],{user:_0x9912x11[_0xc565[46]]})[_0xc565[19]](function(_0x9912x18){return _0x9912xf[_0xc565[16]](201)[_0xc565[15]](_0x9912x18)})[_0xc565[18]](function(_0x9912x10){return handleError(_0x9912xf,_0x9912x10)})};exports[_0xc565[47]]= function(_0x9912x11,_0x9912xf,_0x9912x14){if(_0x9912x11[_0xc565[41]][_0xc565[25]]){delete _0x9912x11[_0xc565[41]][_0xc565[25]]};var _0x9912x19=_0x9912x11[_0xc565[41]];var _0x9912x1a;return OpenchannelAccount[_0xc565[27]](_0x9912x11[_0xc565[26]][_0xc565[25]])[_0xc565[19]](function(_0x9912x13){if(!_0x9912x13){throw  new Error(_0xc565[60])};_0x9912x1a= _0x9912x13;console[_0xc565[48]](_0x9912x19);if(!_0x9912x19[_0xc565[52]]){throw  new Error(_0xc565[61])};return OpenchannelRoom[_0xc565[64]]({limit:1,where:{contact:_0x9912x19[_0xc565[52]],OpenchannelAccountId:_0x9912x1a[_0xc565[25]]},order:[[_0xc565[62],_0xc565[63]]]})})[_0xc565[19]](function(_0x9912x1d){var _0x9912x1c=_0x9912x1d[0];if(!_0x9912x1c|| _0x9912x1c[_0xc565[16]]== _0xc565[51]){var _0x9912x1e=_0x9912x1c?_0x9912x1c[_0xc565[25]]:null;return OpenchannelRoom[_0xc565[38]]({contact:_0x9912x19[_0xc565[52]],OpenchannelAccountId:_0x9912x1a[_0xc565[25]],status:_0xc565[53],ParentId:_0x9912x1e,lastEvent:_0xc565[50],lastEventAt:moment()[_0xc565[55]](_0xc565[54]),openchannelIn:1})}else {return _0x9912x1c[_0xc565[59]]({lastEvent:_0xc565[50],lastEventAt:moment()[_0xc565[55]](_0xc565[54]),status:_0xc565[56],openReason:_0xc565[57],openchannelIn:++_0x9912x1c[_0xc565[58]]})}})[_0xc565[19]](function(_0x9912x1c){_0x9912x19[_0xc565[43]]= _0x9912x1a[_0xc565[25]];_0x9912x19[_0xc565[49]]= _0x9912x1c[_0xc565[25]];_0x9912x19[_0xc565[16]]= _0xc565[50];return OpenchannelMessage[_0xc565[38]](_0x9912x19)})[_0xc565[19]](function(_0x9912x1b){return _0x9912xf[_0xc565[16]](201)[_0xc565[15]](_0x9912x1b)})[_0xc565[18]](function(_0x9912x10){console[_0xc565[48]](_0x9912x10);return handleError(_0x9912xf,_0x9912x10)})};exports[_0xc565[65]]= function(_0x9912x11,_0x9912xf){if(_0x9912x11[_0xc565[41]][_0xc565[25]]){delete _0x9912x11[_0xc565[41]][_0xc565[25]]};return OpenchannelAccount[_0xc565[27]](_0x9912x11[_0xc565[26]][_0xc565[25]])[_0xc565[19]](function(_0x9912x13){if(!_0x9912x13){return _0x9912xf[_0xc565[24]](404)};var _0x9912x1f=_[_0xc565[34]](_0x9912x13,_0x9912x11[_0xc565[41]]);return _0x9912x1f[_0xc565[67]]()})[_0xc565[19]](function(_0x9912x13){return _0x9912xf[_0xc565[16]](200)[_0xc565[15]](_0x9912x13)})[_0xc565[18]](sequelize.UniqueConstraintError,function(_0x9912x10){return Util[_0xc565[40]][_0xc565[39]](_0x9912xf,_0x9912x10)})[_0xc565[18]](function(_0x9912x10){console[_0xc565[48]](_0xc565[66],_0x9912x10);return handleError(_0x9912xf,_0x9912x10)})};exports[_0xc565[68]]= function(_0x9912x11,_0x9912xf){if(_0x9912x11[_0xc565[41]][_0xc565[25]]){delete _0x9912x11[_0xc565[41]][_0xc565[25]]};return OpenchannelDisposition[_0xc565[27]](_0x9912x11[_0xc565[26]][_0xc565[69]])[_0xc565[19]](function(_0x9912x20){if(!_0x9912x20){return _0x9912xf[_0xc565[24]](404)};var _0x9912x1f=_[_0xc565[34]](_0x9912x20,_0x9912x11[_0xc565[41]]);return _0x9912x1f[_0xc565[67]]()})[_0xc565[19]](function(_0x9912x20){return _0x9912xf[_0xc565[16]](200)[_0xc565[15]](_0x9912x20)})[_0xc565[18]](function(_0x9912x10){return handleError(_0x9912xf,_0x9912x10)})};exports[_0xc565[70]]= function(_0x9912x11,_0x9912xf){var _0x9912x21=0;var _0x9912x22=_0x9912x11[_0xc565[41]];_0x9912x22[_0xc565[73]](function(_0x9912x23){delete _0x9912x23[_0xc565[25]];delete _0x9912x23[_0xc565[62]];delete _0x9912x23[_0xc565[71]];_0x9912x23[_0xc565[72]]=  ++_0x9912x21});console[_0xc565[48]](_0xc565[74],_0x9912x11[_0xc565[41]]);return sequelize[_0xc565[77]](function(_0x9912x25){return OpenchannelApplication[_0xc565[76]]({where:{OpenchannelAccountId:_0x9912x11[_0xc565[26]][_0xc565[25]]},individualHooks:true,transaction:_0x9912x25})[_0xc565[19]](function(_0x9912x26){return OpenchannelApplication[_0xc565[75]](_0x9912x22,{individualHooks:true,transaction:_0x9912x25})})})[_0xc565[19]](function(_0x9912x24){return _0x9912xf[_0xc565[16]](200)[_0xc565[15]]({count:_0x9912x24[_0xc565[29]],rows:_0x9912x24})})[_0xc565[18]](function(_0x9912x10){return handleError(_0x9912xf,_0x9912x10)})};exports[_0xc565[78]]= function(_0x9912x11,_0x9912xf){if(_0x9912x11[_0xc565[41]][_0xc565[25]]){delete _0x9912x11[_0xc565[41]][_0xc565[25]]};return OpenchannelApplication[_0xc565[27]](_0x9912x11[_0xc565[26]][_0xc565[79]])[_0xc565[19]](function(_0x9912x26){if(!_0x9912x26){return _0x9912xf[_0xc565[24]](404)};var _0x9912x1f=_[_0xc565[34]](_0x9912x26,_0x9912x11[_0xc565[41]]);return _0x9912x1f[_0xc565[67]]()})[_0xc565[19]](function(_0x9912x26){return _0x9912xf[_0xc565[16]](200)[_0xc565[15]](_0x9912x26)})[_0xc565[18]](function(_0x9912x10){return handleError(_0x9912xf,_0x9912x10)})};exports[_0xc565[76]]= function(_0x9912x11,_0x9912xf){return OpenchannelAccount[_0xc565[27]](_0x9912x11[_0xc565[26]][_0xc565[25]])[_0xc565[19]](function(_0x9912x13){if(!_0x9912x13){return _0x9912xf[_0xc565[24]](404)};return _0x9912x13[_0xc565[76]]()})[_0xc565[19]](function(){return _0x9912xf[_0xc565[24]](204)})[_0xc565[18]](function(_0x9912x10){return handleError(_0x9912xf,_0x9912x10)})};exports[_0xc565[80]]= function(_0x9912x11,_0x9912xf,_0x9912x14){return OpenchannelApplication[_0xc565[27]](_0x9912x11[_0xc565[26]][_0xc565[79]])[_0xc565[19]](function(_0x9912x26){if(!_0x9912x26){return _0x9912xf[_0xc565[24]](404)};return _0x9912x26[_0xc565[76]]()})[_0xc565[19]](function(){return _0x9912xf[_0xc565[24]](204)})[_0xc565[18]](function(_0x9912x10){return handleError(_0x9912xf,_0x9912x10)})};exports[_0xc565[81]]= function(_0x9912x11,_0x9912xf,_0x9912x14){return OpenchannelDisposition[_0xc565[27]](_0x9912x11[_0xc565[26]][_0xc565[69]])[_0xc565[19]](function(_0x9912x17){if(!_0x9912x17){return _0x9912xf[_0xc565[24]](404)};return _0x9912x17[_0xc565[76]]()})[_0xc565[19]](function(){return _0x9912xf[_0xc565[24]](204)})[_0xc565[18]](function(_0x9912x10){return handleError(_0x9912xf,_0x9912x10)})};exports[_0xc565[82]]= function(_0x9912x11,_0x9912xf){return OpenchannelApplication[_0xc565[76]]({where:{id:_0x9912x11[_0xc565[20]][_0xc565[83]]},individualHooks:true})[_0xc565[19]](function(){return _0x9912xf[_0xc565[24]](204)})[_0xc565[18]](function(_0x9912x10){return handleError(_0x9912xf,_0x9912x10)})};exports[_0xc565[84]]= function(_0x9912x11,_0x9912xf,_0x9912x14){var _0x9912x27={where:{OpenchannelAccountId:_0x9912x11[_0xc565[26]][_0xc565[25]],$and:[]},attributes:[_0xc565[25],_0xc565[85],_0xc565[71],_0xc565[86],_0xc565[87],_0xc565[88]],include:[]};if(_0x9912x11[_0xc565[20]]){if(_0x9912x11[_0xc565[20]][_0xc565[86]]){if(_[_0xc565[89]](_0x9912x11[_0xc565[20]][_0xc565[86]])){for(var _0x9912x28=0;_0x9912x28< _0x9912x11[_0xc565[20]][_0xc565[86]][_0xc565[29]];_0x9912x28++){_0x9912x27[_0xc565[93]][_0xc565[92]][_0xc565[91]]({tags:{$like:_0xc565[90]+ _0x9912x11[_0xc565[20]][_0xc565[86]][_0x9912x28]+ _0xc565[90]}})}}else {_0x9912x27[_0xc565[93]][_0xc565[92]][_0xc565[91]]({tags:{$like:_0xc565[90]+ _0x9912x11[_0xc565[20]][_0xc565[86]]+ _0xc565[90]}})};delete _0x9912x11[_0xc565[20]][_0xc565[86]]};_[_0xc565[34]](_0x9912x27[_0xc565[93]],_0x9912x11[_0xc565[20]])};switch(_0x9912x11[_0xc565[46]][_0xc565[103]]){case _0xc565[96]:_0x9912x27[_0xc565[94]][_0xc565[91]]({model:User,attributes:[_0xc565[25]]});var _0x9912x29;var _0x9912x2a;var _0x9912x2b;return User[_0xc565[27]](_0x9912x11[_0xc565[46]][_0xc565[25]])[_0xc565[19]](function(_0x9912x2e){if(_0x9912x2e){return _0x9912x2e[_0xc565[102]]()}else {return []}})[_0xc565[19]](function(_0x9912x2d){_0x9912x2a= _[_0xc565[98]](_0x9912x2d,_0xc565[25]);return OpenchannelAccount[_0xc565[27]](_0x9912x11[_0xc565[26]][_0xc565[25]])})[_0xc565[19]](function(_0x9912x12){return _0x9912x12[_0xc565[35]]({where:{$or:[{app:_0xc565[99]},{app:_0xc565[96]}]}})})[_0xc565[19]](function(_0x9912x22){_0x9912x29= _[_0xc565[98]](_[_0xc565[97]](_0x9912x22,{"\x61\x70\x70":_0xc565[96]}),_0xc565[45]);_0x9912x2b= _[_0xc565[98]](_[_0xc565[97]](_0x9912x22,{"\x61\x70\x70":_0xc565[99]}),_0xc565[100]);if(_[_0xc565[101]](_0x9912x2a,_0x9912x2b)[_0xc565[29]]|| _[_0xc565[101]](_0x9912x29,[_0x9912x11[_0xc565[46]][_0xc565[25]]])[_0xc565[29]]){return OpenchannelRoom[_0xc565[64]](_0x9912x27)[_0xc565[19]](function(_0x9912x2c){return _0x9912xf[_0xc565[16]](200)[_0xc565[15]](_0x9912x2c)})[_0xc565[18]](function(_0x9912x10){console[_0xc565[95]](_0x9912x10);return handleError(_0x9912xf,_0x9912x10)})}else {return _0x9912xf[_0xc565[16]](200)[_0xc565[15]]([])}})[_0xc565[18]](function(_0x9912x10){console[_0xc565[95]](_0x9912x10)});default:return OpenchannelRoom[_0xc565[64]](_0x9912x27)[_0xc565[19]](function(_0x9912x2c){return _0x9912xf[_0xc565[16]](200)[_0xc565[15]](_0x9912x2c)})[_0xc565[18]](function(_0x9912x10){return handleError(_0x9912xf,_0x9912x10)})}}
\ No newline at end of file