Built motion from commit 683a3d1.|0.0.135
[motion.git] / server / config / openchannel / custom.js
index e75c1b5..3ddb10d 100644 (file)
@@ -1 +1 @@
-var _0x2c01=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2E\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x70\x61\x74\x68","\x75\x74\x69\x6C","\x66\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\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\x4D\x65\x73\x73\x61\x67\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x52\x65\x70\x6F\x72\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x41\x63\x74\x69\x6F\x6E","\x43\x6F\x6E\x74\x61\x63\x74","\x2E\x2E\x2F\x72\x6F\x75\x74\x69\x6E\x67\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72","\x6F\x70\x65\x6E\x20\x63\x68\x61\x6E\x6E\x65\x6C\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x61\x63\x63\x6F\x75\x6E\x74","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x4F\x70\x65\x6E\x20\x63\x68\x61\x6E\x6E\x65\x6C\x20\x2D\x20\x41\x63\x63\x6F\x75\x6E\x74\x20","\x6E\x61\x6D\x65","\x20\x43\x52\x45\x41\x54\x45","\x69\x64","\x6F\x6E\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x63\x63\x6F\x75\x6E\x74\x69\x64","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x64","\x63\x68\x61\x6E\x67\x65\x64","\x61\x63\x63\x65\x70\x74","\x77\x65\x62\x68\x6F\x6F\x6B","\x72\x65\x6A\x65\x63\x74\x65\x64\x41\x74","\x72\x65\x6A\x65\x63\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x73\x74\x61\x74\x75\x73","\x43\x4C\x4F\x53\x45\x44","\x63\x6C\x6F\x73\x65","\x6F\x6E\x52\x65\x6D\x6F\x76\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x52\x45\x43\x45\x49\x56\x45\x44","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x25\x73\x2E\x25\x73","\x75\x6E\x69\x78","\x66\x6F\x72\x6D\x61\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D\x49\x64","\x66\x72\x6F\x6D","\x6F\x6E\x53\x65\x6E\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x74\x61\x74\x65","\x20\x55\x50\x44\x41\x54\x45","\x5B\x4F\x70\x65\x6E\x20\x63\x68\x61\x6E\x6E\x65\x6C\x20\x2D\x20\x41\x63\x63\x6F\x75\x6E\x74\x20","\x20\x44\x45\x53\x54\x52\x4F\x59","\x53\x45\x4E\x44\x49\x4E\x47","\x65\x72\x72","\x45\x72\x72\x6F\x72\x20\x75\x70\x64\x61\x74\x69\x6E\x67\x20\x65\x72\x72\x6F\x72\x20\x73\x74\x61\x74\x75\x73","\x63\x61\x74\x63\x68","\x46\x41\x49\x4C\x45\x44","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x74\x68\x65\x6E","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x75\x70\x64\x61\x74\x65","\x53\x45\x4E\x54","\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x53\x45\x4E\x54\x2E\x2E\x2E","\x53\x45\x4E\x44\x49\x4E\x47\x20\x4D\x65\x73\x73\x61\x67\x65\x2E\x2E\x2E","\x72\x65\x70\x6C\x79\x4D\x65\x74\x68\x6F\x64","\x72\x65\x70\x6C\x79\x55\x72\x6C","\x74\x6F","\x62\x6F\x64\x79","\x55\x73\x65\x72\x49\x64","\x73\x65\x6E\x64\x52\x65\x71\x75\x65\x73\x74","\x45\x52\x52\x4F\x52","\x20\x41\x63\x63\x6F\x75\x6E\x74\x20\x48\x54\x54\x50\x20\x4D\x65\x74\x68\x6F\x64\x20\x6F\x72\x20\x55\x52\x4C\x20\x69\x73\x20\x6E\x6F\x74\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64\x2E\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x79\x6F\x75\x72\x20\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x6F\x72\x21\x21","\x61\x64\x64\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x50\x45\x4E\x44\x49\x4E\x47","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4F\x75\x74","\x75\x73\x65\x72","\x73\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x61\x6C\x6C","\x63\x72\x65\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x44\x45\x53\x43","\x66\x69\x6E\x64\x41\x6C\x6C","\x72\x65\x71\x75\x65\x73\x74\x20\x66\x61\x69\x6C\x65\x64\x21","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x75\x63\x63\x65\x73\x73\x65\x66\x75\x6C\x21","\x61\x63\x63\x65\x70\x74\x4D\x65\x74\x68\x6F\x64","\x61\x63\x63\x65\x70\x74\x55\x72\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x3C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x61\x63\x63\x65\x70\x74\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x6C\x65\x6E\x67\x74\x68","\x61\x63\x74\x69\x6F\x6E\x73","\x65\x6E\x61\x62\x6C\x65\x64","\x65\x78\x65\x63\x41\x63\x74\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x65\x6A\x65\x63\x74\x4D\x65\x74\x68\x6F\x64","\x72\x65\x6A\x65\x63\x74\x55\x72\x6C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x72\x65\x6A\x65\x63\x74\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x63\x6C\x6F\x73\x65\x4D\x65\x74\x68\x6F\x64","\x63\x6C\x6F\x73\x65\x55\x72\x6C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x63\x6C\x6F\x73\x65\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x57\x65\x62\x68\x6F\x6F\x6B\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0x2c01[0];var _=require(_0x2c01[1]);var Promise=require(_0x2c01[2]);var Util=require(_0x2c01[3]);var moment=require(_0x2c01[4]);var path=require(_0x2c01[5]);var util=require(_0x2c01[6]);var fs=require(_0x2c01[7]);var Agent=require(_0x2c01[9])[_0x2c01[8]];var OpenchannelRoom=require(_0x2c01[9])[_0x2c01[10]];var OpenchannelMessage=require(_0x2c01[9])[_0x2c01[11]];var OpenchannelAccount=require(_0x2c01[9])[_0x2c01[12]];var ReportOpenchannel=require(_0x2c01[9])[_0x2c01[13]];var Action=require(_0x2c01[9])[_0x2c01[14]];var path=require(_0x2c01[5]);var fs=require(_0x2c01[7]);var Contact=require(_0x2c01[9])[_0x2c01[15]];var Scheduler=require(_0x2c01[16]);function Custom(){console[_0x2c01[18]](_0x2c01[17]);this[_0x2c01[19]]= null}Custom[_0x2c01[21]][_0x2c01[20]]= function(_0x232dx11){var _0x232dx12=this;console[_0x2c01[18]](_0x2c01[22]+ _0x232dx11[_0x2c01[23]]+ _0x2c01[24]);_0x232dx12[_0x2c01[19]]= _0x232dx11;OpenchannelAccount[_0x2c01[27]](function(_0x232dx11){if(_0x232dx12[_0x2c01[19]]&& _0x232dx11[_0x2c01[25]]=== _0x232dx12[_0x2c01[19]][_0x2c01[25]]){_0x232dx12[_0x2c01[26]](_0x232dx11)}});ReportOpenchannel[_0x2c01[27]](function(_0x232dx11){if(_0x232dx12[_0x2c01[19]]&& _0x232dx11[_0x2c01[28]]== _0x232dx12[_0x2c01[19]][_0x2c01[25]]){if(_0x232dx11[_0x2c01[30]](_0x2c01[29])){_0x232dx12[_0x2c01[32]](_0x232dx11,_0x2c01[31])};if(_0x232dx11[_0x2c01[30]](_0x2c01[33])){_0x232dx12[_0x2c01[32]](_0x232dx11,_0x2c01[34])}}});OpenchannelRoom[_0x2c01[27]](function(_0x232dx11){if(_0x232dx12[_0x2c01[19]]&& _0x232dx11[_0x2c01[35]]== _0x232dx12[_0x2c01[19]][_0x2c01[25]]){if(_0x232dx11[_0x2c01[30]](_0x2c01[36])&& _0x232dx11[_0x2c01[36]]=== _0x2c01[37]){_0x232dx12[_0x2c01[32]](_0x232dx11,_0x2c01[38])}}});OpenchannelAccount[_0x2c01[40]](function(_0x232dx11){if(_0x232dx12[_0x2c01[19]]&& _0x232dx11[_0x2c01[25]]=== _0x232dx12[_0x2c01[19]][_0x2c01[25]]){_0x232dx12[_0x2c01[39]](_0x232dx11)}});OpenchannelMessage[_0x2c01[50]](function(_0x232dx11,_0x232dx13){if(_0x232dx12[_0x2c01[19]]&& _0x232dx12[_0x2c01[19]][_0x2c01[25]]== _0x232dx11[_0x2c01[41]][_0x2c01[35]]){if(_0x232dx11[_0x2c01[36]]=== _0x2c01[42]){var _0x232dx14= new Scheduler({channel:_0x2c01[43],uniqueid:util[_0x2c01[46]](_0x2c01[44],moment()[_0x2c01[45]](),_0x232dx11.OpenchannelRoomId),messageid:_0x232dx11[_0x2c01[25]],roomid:_0x232dx11[_0x2c01[47]],accountid:_0x232dx12[_0x2c01[19]][_0x2c01[25]],accountname:_0x232dx12[_0x2c01[19]][_0x2c01[23]],from:_0x232dx11[_0x2c01[48]]});_0x232dx14[_0x2c01[20]]()};_0x232dx12[_0x2c01[49]](_0x232dx11,_0x232dx13)}})};Custom[_0x2c01[21]][_0x2c01[26]]= function(_0x232dx11){if(!_0x232dx11[_0x2c01[30]](_0x2c01[51])){console[_0x2c01[18]](_0x2c01[22]+ _0x232dx11[_0x2c01[23]]+ _0x2c01[52]);this[_0x2c01[19]]= null;this[_0x2c01[19]]= _0x232dx11}};Custom[_0x2c01[21]][_0x2c01[39]]= function(_0x232dx11){console[_0x2c01[18]](_0x2c01[53]+ _0x232dx11[_0x2c01[23]]+ _0x2c01[54]);this[_0x2c01[19]]= null};Custom[_0x2c01[21]][_0x2c01[49]]= function(_0x232dx15,_0x232dx13){var _0x232dx16=this[_0x2c01[19]];var _0x232dx17=_0x232dx15;var _0x232dx18;var _0x232dx19;if(_0x232dx17[_0x2c01[36]]=== _0x2c01[55]){return Promise[_0x2c01[82]]([])[_0x2c01[62]](getRoom(_0x232dx17))[_0x2c01[62]](function(_0x232dx1e){_0x232dx18= _0x232dx1e;return _0x232dx17[_0x2c01[81]](_0x232dx1e[_0x2c01[25]])})[_0x2c01[62]](function(){return _0x232dx18[_0x2c01[61]]({status:_0x2c01[78],lastEvent:_0x2c01[55],lastEventAt:moment()[_0x2c01[46]](_0x2c01[60]),openchannelOut:++_0x232dx18[_0x2c01[79]]},{individualHooks:true,user:_0x232dx13[_0x2c01[80]]})})[_0x2c01[62]](function(_0x232dx1c){return Agent[_0x2c01[77]](_0x232dx17.UserId)})[_0x2c01[62]](function(_0x232dx1d){_0x232dx19= _0x232dx1d;return _0x232dx18[_0x2c01[76]](_0x232dx19)})[_0x2c01[62]](function(){console[_0x2c01[18]](_0x2c01[67]);if(_0x232dx16[_0x2c01[68]]&& _0x232dx16[_0x2c01[69]]){var _0x232dx1c={from:_0x232dx17[_0x2c01[48]],to:_0x232dx17[_0x2c01[70]],body:_0x232dx17[_0x2c01[71]],UserId:_0x232dx17[_0x2c01[72]],OpenchannelAccountId:_0x232dx17[_0x2c01[35]],OpenchannelRoomId:_0x232dx17[_0x2c01[47]]};return Util[_0x2c01[73]](_0x232dx1c,_0x232dx16[_0x2c01[68]],_0x232dx16[_0x2c01[69]])}else {throw {name:_0x2c01[74],message:_0x2c01[75]}}})[_0x2c01[62]](function(_0x232dx1b){console[_0x2c01[18]](_0x2c01[66]);return _0x232dx17[_0x2c01[64]]({status:_0x2c01[65],res_data:JSON[_0x2c01[63]](_0x232dx1b)})})[_0x2c01[62]](function(){return _0x232dx18[_0x2c01[61]]({lastEvent:_0x2c01[65],lastEventAt:moment()[_0x2c01[46]](_0x2c01[60])})})[_0x2c01[58]](function(_0x232dx1a){console[_0x2c01[18]](_0x2c01[56],_0x232dx1a);_0x232dx17[_0x2c01[64]]({status:_0x2c01[59],res_data:JSON[_0x2c01[63]](_0x232dx1a)})[_0x2c01[62]](function(){return _0x232dx18[_0x2c01[61]]({lastEvent:_0x2c01[59],lastEventAt:moment()[_0x2c01[46]](_0x2c01[60])})})[_0x2c01[58]](function(_0x232dx1a){console[_0x2c01[18]](_0x2c01[57])})})}};function getRoom(_0x232dx17){return function(){if(_0x232dx17[_0x2c01[47]]){return OpenchannelRoom[_0x2c01[77]](_0x232dx17.OpenchannelRoomId)}else {return OpenchannelRoom[_0x2c01[86]]({limit:1,where:{contact:_0x232dx17[_0x2c01[70]],OpenchannelAccountId:_0x232dx17[_0x2c01[35]]},order:[[_0x2c01[84],_0x2c01[85]]]})[_0x2c01[62]](function(_0x232dx20){var _0x232dx20=_0x232dx20[0];if(!_0x232dx20|| _0x232dx20[_0x2c01[36]]=== _0x2c01[37]){var _0x232dx21=_0x232dx20?_0x232dx20[_0x2c01[25]]:null;return OpenchannelRoom[_0x2c01[83]]({contact:_0x232dx17[_0x2c01[70]],OpenchannelAccountId:_0x232dx17[_0x2c01[35]],status:_0x2c01[78],ParentId:_0x232dx21})};return _0x232dx20})}}}function execRequest(_0x232dx11,_0x232dx23,_0x232dx24){Util[_0x2c01[73]](_0x232dx11,_0x232dx23,_0x232dx24)[_0x2c01[62]](function(_0x232dx25){console[_0x2c01[18]](_0x2c01[88])})[_0x2c01[58]](function(_0x232dx1a){console[_0x2c01[18]](_0x2c01[87])})}Custom[_0x2c01[21]][_0x2c01[32]]= function(_0x232dx11,_0x232dx26){var _0x232dx16=this[_0x2c01[19]];switch(_0x232dx26){case _0x2c01[31]:if(_0x232dx16[_0x2c01[89]]&& _0x232dx16[_0x2c01[90]]){console[_0x2c01[18]](_0x2c01[91]+ _0x232dx16[_0x2c01[23]]+ _0x2c01[92]);execRequest(_0x232dx11[_0x2c01[41]],_0x232dx16[_0x2c01[89]],_0x232dx16[_0x2c01[90]])};if(_0x232dx16[_0x2c01[94]][_0x2c01[93]]){_[_0x2c01[97]](_0x232dx16[_0x2c01[94]],function(_0x232dx27){if(_0x232dx27[_0x2c01[95]]){Util[_0x2c01[96]](_0x232dx27,_0x232dx11)}})};break;case _0x2c01[34]:if(_0x232dx16[_0x2c01[98]]&& _0x232dx16[_0x2c01[99]]){console[_0x2c01[18]](_0x2c01[91]+ _0x232dx16[_0x2c01[23]]+ _0x2c01[100]);execRequest(_0x232dx11[_0x2c01[41]],_0x232dx16[_0x2c01[98]],_0x232dx16[_0x2c01[99]])};break;case _0x2c01[38]:if(_0x232dx16[_0x2c01[101]]&& _0x232dx16[_0x2c01[102]]){console[_0x2c01[18]](_0x2c01[91]+ _0x232dx16[_0x2c01[23]]+ _0x2c01[103]);execRequest(_0x232dx11[_0x2c01[41]],_0x232dx16[_0x2c01[101]],_0x232dx16[_0x2c01[102]])};break;default:console[_0x2c01[18]](_0x2c01[104])}};module[_0x2c01[105]]= Custom
\ No newline at end of file
+var _0x25f2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2E\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x70\x61\x74\x68","\x75\x74\x69\x6C","\x66\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\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\x4D\x65\x73\x73\x61\x67\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x52\x65\x70\x6F\x72\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x41\x63\x74\x69\x6F\x6E","\x43\x6F\x6E\x74\x61\x63\x74","\x2E\x2E\x2F\x72\x6F\x75\x74\x69\x6E\x67\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72","\x6F\x70\x65\x6E\x20\x63\x68\x61\x6E\x6E\x65\x6C\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x61\x63\x63\x6F\x75\x6E\x74","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x4F\x70\x65\x6E\x20\x63\x68\x61\x6E\x6E\x65\x6C\x20\x2D\x20\x41\x63\x63\x6F\x75\x6E\x74\x20","\x6E\x61\x6D\x65","\x20\x43\x52\x45\x41\x54\x45","\x69\x64","\x6F\x6E\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x63\x63\x6F\x75\x6E\x74\x69\x64","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x64","\x63\x68\x61\x6E\x67\x65\x64","\x61\x63\x63\x65\x70\x74","\x77\x65\x62\x68\x6F\x6F\x6B","\x72\x65\x6A\x65\x63\x74\x65\x64\x41\x74","\x72\x65\x6A\x65\x63\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x73\x74\x61\x74\x75\x73","\x43\x4C\x4F\x53\x45\x44","\x63\x6C\x6F\x73\x65","\x6F\x6E\x52\x65\x6D\x6F\x76\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x52\x45\x43\x45\x49\x56\x45\x44","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x25\x73\x2E\x25\x73","\x75\x6E\x69\x78","\x66\x6F\x72\x6D\x61\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D\x49\x64","\x66\x72\x6F\x6D","\x6F\x6E\x53\x65\x6E\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x74\x61\x74\x65","\x20\x55\x50\x44\x41\x54\x45","\x5B\x4F\x70\x65\x6E\x20\x63\x68\x61\x6E\x6E\x65\x6C\x20\x2D\x20\x41\x63\x63\x6F\x75\x6E\x74\x20","\x20\x44\x45\x53\x54\x52\x4F\x59","\x53\x45\x4E\x44\x49\x4E\x47","\x65\x72\x72","\x45\x72\x72\x6F\x72\x20\x75\x70\x64\x61\x74\x69\x6E\x67\x20\x65\x72\x72\x6F\x72\x20\x73\x74\x61\x74\x75\x73","\x63\x61\x74\x63\x68","\x46\x41\x49\x4C\x45\x44","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x74\x68\x65\x6E","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x75\x70\x64\x61\x74\x65","\x53\x45\x4E\x54","\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x53\x45\x4E\x54\x2E\x2E\x2E","\x53\x45\x4E\x44\x49\x4E\x47\x20\x4D\x65\x73\x73\x61\x67\x65\x2E\x2E\x2E","\x72\x65\x70\x6C\x79\x4D\x65\x74\x68\x6F\x64","\x72\x65\x70\x6C\x79\x55\x72\x6C","\x74\x6F","\x62\x6F\x64\x79","\x55\x73\x65\x72\x49\x64","\x73\x65\x6E\x64\x52\x65\x71\x75\x65\x73\x74","\x45\x52\x52\x4F\x52","\x20\x41\x63\x63\x6F\x75\x6E\x74\x20\x48\x54\x54\x50\x20\x4D\x65\x74\x68\x6F\x64\x20\x6F\x72\x20\x55\x52\x4C\x20\x69\x73\x20\x6E\x6F\x74\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64\x2E\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x79\x6F\x75\x72\x20\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x6F\x72\x21\x21","\x61\x64\x64\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x50\x45\x4E\x44\x49\x4E\x47","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4F\x75\x74","\x75\x73\x65\x72","\x73\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x61\x6C\x6C","\x63\x72\x65\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x44\x45\x53\x43","\x66\x69\x6E\x64\x41\x6C\x6C","\x72\x65\x71\x75\x65\x73\x74\x20\x66\x61\x69\x6C\x65\x64\x21","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x75\x63\x63\x65\x73\x73\x65\x66\x75\x6C\x21","\x61\x63\x63\x65\x70\x74\x4D\x65\x74\x68\x6F\x64","\x61\x63\x63\x65\x70\x74\x55\x72\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x3C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x61\x63\x63\x65\x70\x74\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x6C\x65\x6E\x67\x74\x68","\x61\x63\x74\x69\x6F\x6E\x73","\x65\x6E\x61\x62\x6C\x65\x64","\x65\x78\x65\x63\x41\x63\x74\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x65\x6A\x65\x63\x74\x4D\x65\x74\x68\x6F\x64","\x72\x65\x6A\x65\x63\x74\x55\x72\x6C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x72\x65\x6A\x65\x63\x74\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x63\x6C\x6F\x73\x65\x4D\x65\x74\x68\x6F\x64","\x63\x6C\x6F\x73\x65\x55\x72\x6C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x63\x6C\x6F\x73\x65\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x57\x65\x62\x68\x6F\x6F\x6B\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0x25f2[0];var _=require(_0x25f2[1]);var Promise=require(_0x25f2[2]);var Util=require(_0x25f2[3]);var moment=require(_0x25f2[4]);var path=require(_0x25f2[5]);var util=require(_0x25f2[6]);var fs=require(_0x25f2[7]);var Agent=require(_0x25f2[9])[_0x25f2[8]];var OpenchannelRoom=require(_0x25f2[9])[_0x25f2[10]];var OpenchannelMessage=require(_0x25f2[9])[_0x25f2[11]];var OpenchannelAccount=require(_0x25f2[9])[_0x25f2[12]];var ReportOpenchannel=require(_0x25f2[9])[_0x25f2[13]];var Action=require(_0x25f2[9])[_0x25f2[14]];var path=require(_0x25f2[5]);var fs=require(_0x25f2[7]);var Contact=require(_0x25f2[9])[_0x25f2[15]];var Scheduler=require(_0x25f2[16]);function Custom(){console[_0x25f2[18]](_0x25f2[17]);this[_0x25f2[19]]= null}Custom[_0x25f2[21]][_0x25f2[20]]= function(_0x901fx11){var _0x901fx12=this;console[_0x25f2[18]](_0x25f2[22]+ _0x901fx11[_0x25f2[23]]+ _0x25f2[24]);_0x901fx12[_0x25f2[19]]= _0x901fx11;OpenchannelAccount[_0x25f2[27]](function(_0x901fx11){if(_0x901fx12[_0x25f2[19]]&& _0x901fx11[_0x25f2[25]]=== _0x901fx12[_0x25f2[19]][_0x25f2[25]]){_0x901fx12[_0x25f2[26]](_0x901fx11)}});ReportOpenchannel[_0x25f2[27]](function(_0x901fx11){if(_0x901fx12[_0x25f2[19]]&& _0x901fx11[_0x25f2[28]]== _0x901fx12[_0x25f2[19]][_0x25f2[25]]){if(_0x901fx11[_0x25f2[30]](_0x25f2[29])){_0x901fx12[_0x25f2[32]](_0x901fx11,_0x25f2[31])};if(_0x901fx11[_0x25f2[30]](_0x25f2[33])){_0x901fx12[_0x25f2[32]](_0x901fx11,_0x25f2[34])}}});OpenchannelRoom[_0x25f2[27]](function(_0x901fx11){if(_0x901fx12[_0x25f2[19]]&& _0x901fx11[_0x25f2[35]]== _0x901fx12[_0x25f2[19]][_0x25f2[25]]){if(_0x901fx11[_0x25f2[30]](_0x25f2[36])&& _0x901fx11[_0x25f2[36]]=== _0x25f2[37]){_0x901fx12[_0x25f2[32]](_0x901fx11,_0x25f2[38])}}});OpenchannelAccount[_0x25f2[40]](function(_0x901fx11){if(_0x901fx12[_0x25f2[19]]&& _0x901fx11[_0x25f2[25]]=== _0x901fx12[_0x25f2[19]][_0x25f2[25]]){_0x901fx12[_0x25f2[39]](_0x901fx11)}});OpenchannelMessage[_0x25f2[50]](function(_0x901fx11,_0x901fx13){if(_0x901fx12[_0x25f2[19]]&& _0x901fx12[_0x25f2[19]][_0x25f2[25]]== _0x901fx11[_0x25f2[41]][_0x25f2[35]]){if(_0x901fx11[_0x25f2[36]]=== _0x25f2[42]){var _0x901fx14= new Scheduler({channel:_0x25f2[43],uniqueid:util[_0x25f2[46]](_0x25f2[44],moment()[_0x25f2[45]](),_0x901fx11.OpenchannelRoomId),messageid:_0x901fx11[_0x25f2[25]],roomid:_0x901fx11[_0x25f2[47]],accountid:_0x901fx12[_0x25f2[19]][_0x25f2[25]],accountname:_0x901fx12[_0x25f2[19]][_0x25f2[23]],from:_0x901fx11[_0x25f2[48]]});_0x901fx14[_0x25f2[20]]()};_0x901fx12[_0x25f2[49]](_0x901fx11,_0x901fx13)}})};Custom[_0x25f2[21]][_0x25f2[26]]= function(_0x901fx11){if(!_0x901fx11[_0x25f2[30]](_0x25f2[51])){console[_0x25f2[18]](_0x25f2[22]+ _0x901fx11[_0x25f2[23]]+ _0x25f2[52]);this[_0x25f2[19]]= null;this[_0x25f2[19]]= _0x901fx11}};Custom[_0x25f2[21]][_0x25f2[39]]= function(_0x901fx11){console[_0x25f2[18]](_0x25f2[53]+ _0x901fx11[_0x25f2[23]]+ _0x25f2[54]);this[_0x25f2[19]]= null};Custom[_0x25f2[21]][_0x25f2[49]]= function(_0x901fx15,_0x901fx13){var _0x901fx16=this[_0x25f2[19]];var _0x901fx17=_0x901fx15;var _0x901fx18;var _0x901fx19;if(_0x901fx17[_0x25f2[36]]=== _0x25f2[55]){return Promise[_0x25f2[82]]([])[_0x25f2[62]](getRoom(_0x901fx17))[_0x25f2[62]](function(_0x901fx1e){_0x901fx18= _0x901fx1e;return _0x901fx17[_0x25f2[81]](_0x901fx1e[_0x25f2[25]])})[_0x25f2[62]](function(){return _0x901fx18[_0x25f2[61]]({status:_0x25f2[78],lastEvent:_0x25f2[55],lastEventAt:moment()[_0x25f2[46]](_0x25f2[60]),openchannelOut:++_0x901fx18[_0x25f2[79]]},{individualHooks:true,user:_0x901fx13[_0x25f2[80]]})})[_0x25f2[62]](function(_0x901fx1c){return Agent[_0x25f2[77]](_0x901fx17.UserId)})[_0x25f2[62]](function(_0x901fx1d){_0x901fx19= _0x901fx1d;return _0x901fx18[_0x25f2[76]](_0x901fx19)})[_0x25f2[62]](function(){console[_0x25f2[18]](_0x25f2[67]);if(_0x901fx16[_0x25f2[68]]&& _0x901fx16[_0x25f2[69]]){var _0x901fx1c={from:_0x901fx17[_0x25f2[48]],to:_0x901fx17[_0x25f2[70]],body:_0x901fx17[_0x25f2[71]],UserId:_0x901fx17[_0x25f2[72]],OpenchannelAccountId:_0x901fx17[_0x25f2[35]],OpenchannelRoomId:_0x901fx17[_0x25f2[47]]};return Util[_0x25f2[73]](_0x901fx1c,_0x901fx16[_0x25f2[68]],_0x901fx16[_0x25f2[69]])}else {throw {name:_0x25f2[74],message:_0x25f2[75]}}})[_0x25f2[62]](function(_0x901fx1b){console[_0x25f2[18]](_0x25f2[66]);return _0x901fx17[_0x25f2[64]]({status:_0x25f2[65],res_data:JSON[_0x25f2[63]](_0x901fx1b)})})[_0x25f2[62]](function(){return _0x901fx18[_0x25f2[61]]({lastEvent:_0x25f2[65],lastEventAt:moment()[_0x25f2[46]](_0x25f2[60])})})[_0x25f2[58]](function(_0x901fx1a){console[_0x25f2[18]](_0x25f2[56],_0x901fx1a);_0x901fx17[_0x25f2[64]]({status:_0x25f2[59],res_data:JSON[_0x25f2[63]](_0x901fx1a)})[_0x25f2[62]](function(){return _0x901fx18[_0x25f2[61]]({lastEvent:_0x25f2[59],lastEventAt:moment()[_0x25f2[46]](_0x25f2[60])})})[_0x25f2[58]](function(_0x901fx1a){console[_0x25f2[18]](_0x25f2[57])})})}};function getRoom(_0x901fx17){return function(){if(_0x901fx17[_0x25f2[47]]){return OpenchannelRoom[_0x25f2[77]](_0x901fx17.OpenchannelRoomId)}else {return OpenchannelRoom[_0x25f2[86]]({limit:1,where:{contact:_0x901fx17[_0x25f2[70]],OpenchannelAccountId:_0x901fx17[_0x25f2[35]]},order:[[_0x25f2[84],_0x25f2[85]]]})[_0x25f2[62]](function(_0x901fx20){var _0x901fx20=_0x901fx20[0];if(!_0x901fx20|| _0x901fx20[_0x25f2[36]]=== _0x25f2[37]){var _0x901fx21=_0x901fx20?_0x901fx20[_0x25f2[25]]:null;return OpenchannelRoom[_0x25f2[83]]({contact:_0x901fx17[_0x25f2[70]],OpenchannelAccountId:_0x901fx17[_0x25f2[35]],status:_0x25f2[78],ParentId:_0x901fx21})};return _0x901fx20})}}}function execRequest(_0x901fx11,_0x901fx23,_0x901fx24){Util[_0x25f2[73]](_0x901fx11,_0x901fx23,_0x901fx24)[_0x25f2[62]](function(_0x901fx25){console[_0x25f2[18]](_0x25f2[88])})[_0x25f2[58]](function(_0x901fx1a){console[_0x25f2[18]](_0x25f2[87])})}Custom[_0x25f2[21]][_0x25f2[32]]= function(_0x901fx11,_0x901fx26){var _0x901fx16=this[_0x25f2[19]];switch(_0x901fx26){case _0x25f2[31]:if(_0x901fx16[_0x25f2[89]]&& _0x901fx16[_0x25f2[90]]){console[_0x25f2[18]](_0x25f2[91]+ _0x901fx16[_0x25f2[23]]+ _0x25f2[92]);execRequest(_0x901fx11[_0x25f2[41]],_0x901fx16[_0x25f2[89]],_0x901fx16[_0x25f2[90]])};if(_0x901fx16[_0x25f2[94]][_0x25f2[93]]){_[_0x25f2[97]](_0x901fx16[_0x25f2[94]],function(_0x901fx27){if(_0x901fx27[_0x25f2[95]]){Util[_0x25f2[96]](_0x901fx27,_0x901fx11)}})};break;case _0x25f2[34]:if(_0x901fx16[_0x25f2[98]]&& _0x901fx16[_0x25f2[99]]){console[_0x25f2[18]](_0x25f2[91]+ _0x901fx16[_0x25f2[23]]+ _0x25f2[100]);execRequest(_0x901fx11[_0x25f2[41]],_0x901fx16[_0x25f2[98]],_0x901fx16[_0x25f2[99]])};break;case _0x25f2[38]:if(_0x901fx16[_0x25f2[101]]&& _0x901fx16[_0x25f2[102]]){console[_0x25f2[18]](_0x25f2[91]+ _0x901fx16[_0x25f2[23]]+ _0x25f2[103]);execRequest(_0x901fx11[_0x25f2[41]],_0x901fx16[_0x25f2[101]],_0x901fx16[_0x25f2[102]])};break;default:console[_0x25f2[18]](_0x25f2[104])}};module[_0x25f2[105]]= Custom
\ No newline at end of file