Built motion from commit 2e74e5e.|0.0.138
[motion.git] / server / config / openchannel / custom.js
index 6ead3d6..83a04b2 100644 (file)
@@ -1 +1 @@
-var _0x9451=["\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"];_0x9451[0];var _=require(_0x9451[1]);var Promise=require(_0x9451[2]);var Util=require(_0x9451[3]);var moment=require(_0x9451[4]);var path=require(_0x9451[5]);var util=require(_0x9451[6]);var fs=require(_0x9451[7]);var Agent=require(_0x9451[9])[_0x9451[8]];var OpenchannelRoom=require(_0x9451[9])[_0x9451[10]];var OpenchannelMessage=require(_0x9451[9])[_0x9451[11]];var OpenchannelAccount=require(_0x9451[9])[_0x9451[12]];var ReportOpenchannel=require(_0x9451[9])[_0x9451[13]];var Action=require(_0x9451[9])[_0x9451[14]];var path=require(_0x9451[5]);var fs=require(_0x9451[7]);var Contact=require(_0x9451[9])[_0x9451[15]];var Scheduler=require(_0x9451[16]);function Custom(){console[_0x9451[18]](_0x9451[17]);this[_0x9451[19]]= null}Custom[_0x9451[21]][_0x9451[20]]= function(_0xa586x11){var _0xa586x12=this;console[_0x9451[18]](_0x9451[22]+ _0xa586x11[_0x9451[23]]+ _0x9451[24]);_0xa586x12[_0x9451[19]]= _0xa586x11;OpenchannelAccount[_0x9451[27]](function(_0xa586x11){if(_0xa586x12[_0x9451[19]]&& _0xa586x11[_0x9451[25]]=== _0xa586x12[_0x9451[19]][_0x9451[25]]){_0xa586x12[_0x9451[26]](_0xa586x11)}});ReportOpenchannel[_0x9451[27]](function(_0xa586x11){if(_0xa586x12[_0x9451[19]]&& _0xa586x11[_0x9451[28]]== _0xa586x12[_0x9451[19]][_0x9451[25]]){if(_0xa586x11[_0x9451[30]](_0x9451[29])){_0xa586x12[_0x9451[32]](_0xa586x11,_0x9451[31])};if(_0xa586x11[_0x9451[30]](_0x9451[33])){_0xa586x12[_0x9451[32]](_0xa586x11,_0x9451[34])}}});OpenchannelRoom[_0x9451[27]](function(_0xa586x11){if(_0xa586x12[_0x9451[19]]&& _0xa586x11[_0x9451[35]]== _0xa586x12[_0x9451[19]][_0x9451[25]]){if(_0xa586x11[_0x9451[30]](_0x9451[36])&& _0xa586x11[_0x9451[36]]=== _0x9451[37]){_0xa586x12[_0x9451[32]](_0xa586x11,_0x9451[38])}}});OpenchannelAccount[_0x9451[40]](function(_0xa586x11){if(_0xa586x12[_0x9451[19]]&& _0xa586x11[_0x9451[25]]=== _0xa586x12[_0x9451[19]][_0x9451[25]]){_0xa586x12[_0x9451[39]](_0xa586x11)}});OpenchannelMessage[_0x9451[50]](function(_0xa586x11,_0xa586x13){if(_0xa586x12[_0x9451[19]]&& _0xa586x12[_0x9451[19]][_0x9451[25]]== _0xa586x11[_0x9451[41]][_0x9451[35]]){if(_0xa586x11[_0x9451[36]]=== _0x9451[42]){var _0xa586x14= new Scheduler({channel:_0x9451[43],uniqueid:util[_0x9451[46]](_0x9451[44],moment()[_0x9451[45]](),_0xa586x11.OpenchannelRoomId),messageid:_0xa586x11[_0x9451[25]],roomid:_0xa586x11[_0x9451[47]],accountid:_0xa586x12[_0x9451[19]][_0x9451[25]],accountname:_0xa586x12[_0x9451[19]][_0x9451[23]],from:_0xa586x11[_0x9451[48]]});_0xa586x14[_0x9451[20]]()};_0xa586x12[_0x9451[49]](_0xa586x11,_0xa586x13)}})};Custom[_0x9451[21]][_0x9451[26]]= function(_0xa586x11){if(!_0xa586x11[_0x9451[30]](_0x9451[51])){console[_0x9451[18]](_0x9451[22]+ _0xa586x11[_0x9451[23]]+ _0x9451[52]);this[_0x9451[19]]= null;this[_0x9451[19]]= _0xa586x11}};Custom[_0x9451[21]][_0x9451[39]]= function(_0xa586x11){console[_0x9451[18]](_0x9451[53]+ _0xa586x11[_0x9451[23]]+ _0x9451[54]);this[_0x9451[19]]= null};Custom[_0x9451[21]][_0x9451[49]]= function(_0xa586x15,_0xa586x13){var _0xa586x16=this[_0x9451[19]];var _0xa586x17=_0xa586x15;var _0xa586x18;var _0xa586x19;if(_0xa586x17[_0x9451[36]]=== _0x9451[55]){return Promise[_0x9451[82]]([])[_0x9451[62]](getRoom(_0xa586x17))[_0x9451[62]](function(_0xa586x1e){_0xa586x18= _0xa586x1e;return _0xa586x17[_0x9451[81]](_0xa586x1e[_0x9451[25]])})[_0x9451[62]](function(){return _0xa586x18[_0x9451[61]]({status:_0x9451[78],lastEvent:_0x9451[55],lastEventAt:moment()[_0x9451[46]](_0x9451[60]),openchannelOut:++_0xa586x18[_0x9451[79]]},{individualHooks:true,user:_0xa586x13[_0x9451[80]]})})[_0x9451[62]](function(_0xa586x1c){return Agent[_0x9451[77]](_0xa586x17.UserId)})[_0x9451[62]](function(_0xa586x1d){_0xa586x19= _0xa586x1d;return _0xa586x18[_0x9451[76]](_0xa586x19)})[_0x9451[62]](function(){console[_0x9451[18]](_0x9451[67]);if(_0xa586x16[_0x9451[68]]&& _0xa586x16[_0x9451[69]]){var _0xa586x1c={from:_0xa586x17[_0x9451[48]],to:_0xa586x17[_0x9451[70]],body:_0xa586x17[_0x9451[71]],UserId:_0xa586x17[_0x9451[72]],OpenchannelAccountId:_0xa586x17[_0x9451[35]],OpenchannelRoomId:_0xa586x17[_0x9451[47]]};return Util[_0x9451[73]](_0xa586x1c,_0xa586x16[_0x9451[68]],_0xa586x16[_0x9451[69]])}else {throw {name:_0x9451[74],message:_0x9451[75]}}})[_0x9451[62]](function(_0xa586x1b){console[_0x9451[18]](_0x9451[66]);return _0xa586x17[_0x9451[64]]({status:_0x9451[65],res_data:JSON[_0x9451[63]](_0xa586x1b)})})[_0x9451[62]](function(){return _0xa586x18[_0x9451[61]]({lastEvent:_0x9451[65],lastEventAt:moment()[_0x9451[46]](_0x9451[60])})})[_0x9451[58]](function(_0xa586x1a){console[_0x9451[18]](_0x9451[56],_0xa586x1a);_0xa586x17[_0x9451[64]]({status:_0x9451[59],res_data:JSON[_0x9451[63]](_0xa586x1a)})[_0x9451[62]](function(){return _0xa586x18[_0x9451[61]]({lastEvent:_0x9451[59],lastEventAt:moment()[_0x9451[46]](_0x9451[60])})})[_0x9451[58]](function(_0xa586x1a){console[_0x9451[18]](_0x9451[57])})})}};function getRoom(_0xa586x17){return function(){if(_0xa586x17[_0x9451[47]]){return OpenchannelRoom[_0x9451[77]](_0xa586x17.OpenchannelRoomId)}else {return OpenchannelRoom[_0x9451[86]]({limit:1,where:{contact:_0xa586x17[_0x9451[70]],OpenchannelAccountId:_0xa586x17[_0x9451[35]]},order:[[_0x9451[84],_0x9451[85]]]})[_0x9451[62]](function(_0xa586x20){var _0xa586x20=_0xa586x20[0];if(!_0xa586x20|| _0xa586x20[_0x9451[36]]=== _0x9451[37]){var _0xa586x21=_0xa586x20?_0xa586x20[_0x9451[25]]:null;return OpenchannelRoom[_0x9451[83]]({contact:_0xa586x17[_0x9451[70]],OpenchannelAccountId:_0xa586x17[_0x9451[35]],status:_0x9451[78],ParentId:_0xa586x21})};return _0xa586x20})}}}function execRequest(_0xa586x11,_0xa586x23,_0xa586x24){Util[_0x9451[73]](_0xa586x11,_0xa586x23,_0xa586x24)[_0x9451[62]](function(_0xa586x25){console[_0x9451[18]](_0x9451[88])})[_0x9451[58]](function(_0xa586x1a){console[_0x9451[18]](_0x9451[87])})}Custom[_0x9451[21]][_0x9451[32]]= function(_0xa586x11,_0xa586x26){var _0xa586x16=this[_0x9451[19]];switch(_0xa586x26){case _0x9451[31]:if(_0xa586x16[_0x9451[89]]&& _0xa586x16[_0x9451[90]]){console[_0x9451[18]](_0x9451[91]+ _0xa586x16[_0x9451[23]]+ _0x9451[92]);execRequest(_0xa586x11[_0x9451[41]],_0xa586x16[_0x9451[89]],_0xa586x16[_0x9451[90]])};if(_0xa586x16[_0x9451[94]][_0x9451[93]]){_[_0x9451[97]](_0xa586x16[_0x9451[94]],function(_0xa586x27){if(_0xa586x27[_0x9451[95]]){Util[_0x9451[96]](_0xa586x27,_0xa586x11)}})};break;case _0x9451[34]:if(_0xa586x16[_0x9451[98]]&& _0xa586x16[_0x9451[99]]){console[_0x9451[18]](_0x9451[91]+ _0xa586x16[_0x9451[23]]+ _0x9451[100]);execRequest(_0xa586x11[_0x9451[41]],_0xa586x16[_0x9451[98]],_0xa586x16[_0x9451[99]])};break;case _0x9451[38]:if(_0xa586x16[_0x9451[101]]&& _0xa586x16[_0x9451[102]]){console[_0x9451[18]](_0x9451[91]+ _0xa586x16[_0x9451[23]]+ _0x9451[103]);execRequest(_0xa586x11[_0x9451[41]],_0xa586x16[_0x9451[101]],_0xa586x16[_0x9451[102]])};break;default:console[_0x9451[18]](_0x9451[104])}};module[_0x9451[105]]= Custom
\ No newline at end of file
+var _0xee73=["\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"];_0xee73[0];var _=require(_0xee73[1]);var Promise=require(_0xee73[2]);var Util=require(_0xee73[3]);var moment=require(_0xee73[4]);var path=require(_0xee73[5]);var util=require(_0xee73[6]);var fs=require(_0xee73[7]);var Agent=require(_0xee73[9])[_0xee73[8]];var OpenchannelRoom=require(_0xee73[9])[_0xee73[10]];var OpenchannelMessage=require(_0xee73[9])[_0xee73[11]];var OpenchannelAccount=require(_0xee73[9])[_0xee73[12]];var ReportOpenchannel=require(_0xee73[9])[_0xee73[13]];var Action=require(_0xee73[9])[_0xee73[14]];var path=require(_0xee73[5]);var fs=require(_0xee73[7]);var Contact=require(_0xee73[9])[_0xee73[15]];var Scheduler=require(_0xee73[16]);function Custom(){console[_0xee73[18]](_0xee73[17]);this[_0xee73[19]]= null}Custom[_0xee73[21]][_0xee73[20]]= function(_0xaa06x11){var _0xaa06x12=this;console[_0xee73[18]](_0xee73[22]+ _0xaa06x11[_0xee73[23]]+ _0xee73[24]);_0xaa06x12[_0xee73[19]]= _0xaa06x11;OpenchannelAccount[_0xee73[27]](function(_0xaa06x11){if(_0xaa06x12[_0xee73[19]]&& _0xaa06x11[_0xee73[25]]=== _0xaa06x12[_0xee73[19]][_0xee73[25]]){_0xaa06x12[_0xee73[26]](_0xaa06x11)}});ReportOpenchannel[_0xee73[27]](function(_0xaa06x11){if(_0xaa06x12[_0xee73[19]]&& _0xaa06x11[_0xee73[28]]== _0xaa06x12[_0xee73[19]][_0xee73[25]]){if(_0xaa06x11[_0xee73[30]](_0xee73[29])){_0xaa06x12[_0xee73[32]](_0xaa06x11,_0xee73[31])};if(_0xaa06x11[_0xee73[30]](_0xee73[33])){_0xaa06x12[_0xee73[32]](_0xaa06x11,_0xee73[34])}}});OpenchannelRoom[_0xee73[27]](function(_0xaa06x11){if(_0xaa06x12[_0xee73[19]]&& _0xaa06x11[_0xee73[35]]== _0xaa06x12[_0xee73[19]][_0xee73[25]]){if(_0xaa06x11[_0xee73[30]](_0xee73[36])&& _0xaa06x11[_0xee73[36]]=== _0xee73[37]){_0xaa06x12[_0xee73[32]](_0xaa06x11,_0xee73[38])}}});OpenchannelAccount[_0xee73[40]](function(_0xaa06x11){if(_0xaa06x12[_0xee73[19]]&& _0xaa06x11[_0xee73[25]]=== _0xaa06x12[_0xee73[19]][_0xee73[25]]){_0xaa06x12[_0xee73[39]](_0xaa06x11)}});OpenchannelMessage[_0xee73[50]](function(_0xaa06x11,_0xaa06x13){if(_0xaa06x12[_0xee73[19]]&& _0xaa06x12[_0xee73[19]][_0xee73[25]]== _0xaa06x11[_0xee73[41]][_0xee73[35]]){if(_0xaa06x11[_0xee73[36]]=== _0xee73[42]){var _0xaa06x14= new Scheduler({channel:_0xee73[43],uniqueid:util[_0xee73[46]](_0xee73[44],moment()[_0xee73[45]](),_0xaa06x11.OpenchannelRoomId),messageid:_0xaa06x11[_0xee73[25]],roomid:_0xaa06x11[_0xee73[47]],accountid:_0xaa06x12[_0xee73[19]][_0xee73[25]],accountname:_0xaa06x12[_0xee73[19]][_0xee73[23]],from:_0xaa06x11[_0xee73[48]]});_0xaa06x14[_0xee73[20]]()};_0xaa06x12[_0xee73[49]](_0xaa06x11,_0xaa06x13)}})};Custom[_0xee73[21]][_0xee73[26]]= function(_0xaa06x11){if(!_0xaa06x11[_0xee73[30]](_0xee73[51])){console[_0xee73[18]](_0xee73[22]+ _0xaa06x11[_0xee73[23]]+ _0xee73[52]);this[_0xee73[19]]= null;this[_0xee73[19]]= _0xaa06x11}};Custom[_0xee73[21]][_0xee73[39]]= function(_0xaa06x11){console[_0xee73[18]](_0xee73[53]+ _0xaa06x11[_0xee73[23]]+ _0xee73[54]);this[_0xee73[19]]= null};Custom[_0xee73[21]][_0xee73[49]]= function(_0xaa06x15,_0xaa06x13){var _0xaa06x16=this[_0xee73[19]];var _0xaa06x17=_0xaa06x15;var _0xaa06x18;var _0xaa06x19;if(_0xaa06x17[_0xee73[36]]=== _0xee73[55]){return Promise[_0xee73[82]]([])[_0xee73[62]](getRoom(_0xaa06x17))[_0xee73[62]](function(_0xaa06x1e){_0xaa06x18= _0xaa06x1e;return _0xaa06x17[_0xee73[81]](_0xaa06x1e[_0xee73[25]])})[_0xee73[62]](function(){return _0xaa06x18[_0xee73[61]]({status:_0xee73[78],lastEvent:_0xee73[55],lastEventAt:moment()[_0xee73[46]](_0xee73[60]),openchannelOut:++_0xaa06x18[_0xee73[79]]},{individualHooks:true,user:_0xaa06x13[_0xee73[80]]})})[_0xee73[62]](function(_0xaa06x1c){return Agent[_0xee73[77]](_0xaa06x17.UserId)})[_0xee73[62]](function(_0xaa06x1d){_0xaa06x19= _0xaa06x1d;return _0xaa06x18[_0xee73[76]](_0xaa06x19)})[_0xee73[62]](function(){console[_0xee73[18]](_0xee73[67]);if(_0xaa06x16[_0xee73[68]]&& _0xaa06x16[_0xee73[69]]){var _0xaa06x1c={from:_0xaa06x17[_0xee73[48]],to:_0xaa06x17[_0xee73[70]],body:_0xaa06x17[_0xee73[71]],UserId:_0xaa06x17[_0xee73[72]],OpenchannelAccountId:_0xaa06x17[_0xee73[35]],OpenchannelRoomId:_0xaa06x17[_0xee73[47]]};return Util[_0xee73[73]](_0xaa06x1c,_0xaa06x16[_0xee73[68]],_0xaa06x16[_0xee73[69]])}else {throw {name:_0xee73[74],message:_0xee73[75]}}})[_0xee73[62]](function(_0xaa06x1b){console[_0xee73[18]](_0xee73[66]);return _0xaa06x17[_0xee73[64]]({status:_0xee73[65],res_data:JSON[_0xee73[63]](_0xaa06x1b)})})[_0xee73[62]](function(){return _0xaa06x18[_0xee73[61]]({lastEvent:_0xee73[65],lastEventAt:moment()[_0xee73[46]](_0xee73[60])})})[_0xee73[58]](function(_0xaa06x1a){console[_0xee73[18]](_0xee73[56],_0xaa06x1a);_0xaa06x17[_0xee73[64]]({status:_0xee73[59],res_data:JSON[_0xee73[63]](_0xaa06x1a)})[_0xee73[62]](function(){return _0xaa06x18[_0xee73[61]]({lastEvent:_0xee73[59],lastEventAt:moment()[_0xee73[46]](_0xee73[60])})})[_0xee73[58]](function(_0xaa06x1a){console[_0xee73[18]](_0xee73[57])})})}};function getRoom(_0xaa06x17){return function(){if(_0xaa06x17[_0xee73[47]]){return OpenchannelRoom[_0xee73[77]](_0xaa06x17.OpenchannelRoomId)}else {return OpenchannelRoom[_0xee73[86]]({limit:1,where:{contact:_0xaa06x17[_0xee73[70]],OpenchannelAccountId:_0xaa06x17[_0xee73[35]]},order:[[_0xee73[84],_0xee73[85]]]})[_0xee73[62]](function(_0xaa06x20){var _0xaa06x20=_0xaa06x20[0];if(!_0xaa06x20|| _0xaa06x20[_0xee73[36]]=== _0xee73[37]){var _0xaa06x21=_0xaa06x20?_0xaa06x20[_0xee73[25]]:null;return OpenchannelRoom[_0xee73[83]]({contact:_0xaa06x17[_0xee73[70]],OpenchannelAccountId:_0xaa06x17[_0xee73[35]],status:_0xee73[78],ParentId:_0xaa06x21})};return _0xaa06x20})}}}function execRequest(_0xaa06x11,_0xaa06x23,_0xaa06x24){Util[_0xee73[73]](_0xaa06x11,_0xaa06x23,_0xaa06x24)[_0xee73[62]](function(_0xaa06x25){console[_0xee73[18]](_0xee73[88])})[_0xee73[58]](function(_0xaa06x1a){console[_0xee73[18]](_0xee73[87])})}Custom[_0xee73[21]][_0xee73[32]]= function(_0xaa06x11,_0xaa06x26){var _0xaa06x16=this[_0xee73[19]];switch(_0xaa06x26){case _0xee73[31]:if(_0xaa06x16[_0xee73[89]]&& _0xaa06x16[_0xee73[90]]){console[_0xee73[18]](_0xee73[91]+ _0xaa06x16[_0xee73[23]]+ _0xee73[92]);execRequest(_0xaa06x11[_0xee73[41]],_0xaa06x16[_0xee73[89]],_0xaa06x16[_0xee73[90]])};if(_0xaa06x16[_0xee73[94]][_0xee73[93]]){_[_0xee73[97]](_0xaa06x16[_0xee73[94]],function(_0xaa06x27){if(_0xaa06x27[_0xee73[95]]){Util[_0xee73[96]](_0xaa06x27,_0xaa06x11)}})};break;case _0xee73[34]:if(_0xaa06x16[_0xee73[98]]&& _0xaa06x16[_0xee73[99]]){console[_0xee73[18]](_0xee73[91]+ _0xaa06x16[_0xee73[23]]+ _0xee73[100]);execRequest(_0xaa06x11[_0xee73[41]],_0xaa06x16[_0xee73[98]],_0xaa06x16[_0xee73[99]])};break;case _0xee73[38]:if(_0xaa06x16[_0xee73[101]]&& _0xaa06x16[_0xee73[102]]){console[_0xee73[18]](_0xee73[91]+ _0xaa06x16[_0xee73[23]]+ _0xee73[103]);execRequest(_0xaa06x11[_0xee73[41]],_0xaa06x16[_0xee73[101]],_0xaa06x16[_0xee73[102]])};break;default:console[_0xee73[18]](_0xee73[104])}};module[_0xee73[105]]= Custom
\ No newline at end of file