e0a1014173feb94d110cb6b5a57bada18d02b26c
[motion.git] / server / config / tools / chatRoom.js
1 var _0x54f6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x73\x74\x61\x74\x75\x73","\x63\x68\x61\x6E\x67\x65\x64","\x43\x4C\x4F\x53\x45\x44","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72\x49\x64","\x45\x72\x72\x6F\x72\x3A","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x63\x6F\x6D\x70\x6C\x65\x74\x65\x52\x65\x61\x73\x6F\x6E","\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","\x69\x64","\x75\x70\x64\x61\x74\x65","\x74\x68\x65\x6E","\x73\x65\x72\x76\x65\x64","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x75\x6E\x73\x65\x72\x76\x65\x64","\x41\x42\x41\x4E\x44\x4F\x4E","\x61\x62\x61\x6E\x64\x6F\x6E","\x72\x61\x74\x69\x6E\x67","\x72\x61\x74\x69\x6E\x67\x4D\x65\x73\x73\x61\x67\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x54f6[0];var _=require(_0x54f6[1]);var moment=require(_0x54f6[2]);var ChatRoomModel=require(_0x54f6[4])[_0x54f6[3]];var ChatVisitorModel=require(_0x54f6[4])[_0x54f6[5]];var ReportChatSessionModel=require(_0x54f6[4])[_0x54f6[6]];var ReportChatRoomModel=require(_0x54f6[4])[_0x54f6[7]];function ChatRoom(){ChatRoomModel[_0x54f6[31]](function(_0x2780x8){if(_0x2780x8[_0x54f6[9]](_0x54f6[8])&& _0x2780x8[_0x54f6[8]]=== _0x54f6[10]){if(_0x2780x8[_0x54f6[11]]){return ChatVisitorModel[_0x54f6[24]](_0x2780x8.ChatVisitorId)[_0x54f6[20]](function(_0x2780xa){if(_0x2780xa){var _0x2780xb=_[_0x54f6[22]](_0x2780xa,{status:_0x54f6[21]});return _0x2780xb[_0x54f6[23]]()}})[_0x54f6[20]](function(){return ReportChatSessionModel[_0x54f6[19]]({complete:true,completeReason:_0x2780x8[_0x54f6[15]],completeAt:moment()[_0x54f6[17]](_0x54f6[16])},{where:{roomid:_0x2780x8[_0x54f6[18]],complete:false,abandon:false,unmanaged:false},individualHooks:true})})[_0x54f6[14]](function(_0x2780x9){console[_0x54f6[13]](_0x54f6[12],_0x2780x9)})}};if(_0x2780x8[_0x54f6[9]](_0x54f6[8])&& _0x2780x8[_0x54f6[8]]=== _0x54f6[25]){if(_0x2780x8[_0x54f6[11]]){return ChatVisitorModel[_0x54f6[24]](_0x2780x8.ChatVisitorId)[_0x54f6[20]](function(_0x2780xa){if(_0x2780xa){return _0x2780xa[_0x54f6[19]]({status:_0x54f6[26]})}})[_0x54f6[14]](function(_0x2780x9){console[_0x54f6[13]](_0x54f6[12],_0x2780x9)})}};if(_0x2780x8[_0x54f6[9]](_0x54f6[8])&& _0x2780x8[_0x54f6[8]]=== _0x54f6[27]){if(_0x2780x8[_0x54f6[11]]){return ChatVisitorModel[_0x54f6[24]](_0x2780x8.ChatVisitorId)[_0x54f6[20]](function(_0x2780xa){if(_0x2780xa){return _0x2780xa[_0x54f6[19]]({status:_0x54f6[28]})}})[_0x54f6[14]](function(_0x2780x9){console[_0x54f6[13]](_0x54f6[12],_0x2780x9)})}};if(_0x2780x8[_0x54f6[9]](_0x54f6[29])){if(_0x2780x8[_0x54f6[18]]){return ReportChatRoomModel[_0x54f6[19]]({crating:_0x2780x8[_0x54f6[29]],cratingMessage:_0x2780x8[_0x54f6[30]]},{where:{roomid:_0x2780x8[_0x54f6[18]]},individualHooks:true})[_0x54f6[14]](function(_0x2780x9){console[_0x54f6[13]](_0x54f6[12],_0x2780x9)})}}})}module[_0x54f6[32]]= ChatRoom