Built motion from commit b33b832.|1.0.17
[motion.git] / server / config / tools / chatRoom.js
1 var _0x5f49=["\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"];_0x5f49[0];var _=require(_0x5f49[1]);var moment=require(_0x5f49[2]);var ChatRoomModel=require(_0x5f49[4])[_0x5f49[3]];var ChatVisitorModel=require(_0x5f49[4])[_0x5f49[5]];var ReportChatSessionModel=require(_0x5f49[4])[_0x5f49[6]];var ReportChatRoomModel=require(_0x5f49[4])[_0x5f49[7]];function ChatRoom(){ChatRoomModel[_0x5f49[31]](function(_0x475ax8){if(_0x475ax8[_0x5f49[9]](_0x5f49[8])&& _0x475ax8[_0x5f49[8]]=== _0x5f49[10]){if(_0x475ax8[_0x5f49[11]]){return ChatVisitorModel[_0x5f49[24]](_0x475ax8.ChatVisitorId)[_0x5f49[20]](function(_0x475axa){if(_0x475axa){var _0x475axb=_[_0x5f49[22]](_0x475axa,{status:_0x5f49[21]});return _0x475axb[_0x5f49[23]]()}})[_0x5f49[20]](function(){return ReportChatSessionModel[_0x5f49[19]]({complete:true,completeReason:_0x475ax8[_0x5f49[15]],completeAt:moment()[_0x5f49[17]](_0x5f49[16])},{where:{roomid:_0x475ax8[_0x5f49[18]],complete:false,abandon:false,timeout:false},individualHooks:true})})[_0x5f49[14]](function(_0x475ax9){console[_0x5f49[13]](_0x5f49[12],_0x475ax9)})}};if(_0x475ax8[_0x5f49[9]](_0x5f49[8])&& _0x475ax8[_0x5f49[8]]=== _0x5f49[25]){if(_0x475ax8[_0x5f49[11]]){return ChatVisitorModel[_0x5f49[24]](_0x475ax8.ChatVisitorId)[_0x5f49[20]](function(_0x475axa){if(_0x475axa){return _0x475axa[_0x5f49[19]]({status:_0x5f49[26]})}})[_0x5f49[14]](function(_0x475ax9){console[_0x5f49[13]](_0x5f49[12],_0x475ax9)})}};if(_0x475ax8[_0x5f49[9]](_0x5f49[8])&& _0x475ax8[_0x5f49[8]]=== _0x5f49[27]){if(_0x475ax8[_0x5f49[11]]){return ChatVisitorModel[_0x5f49[24]](_0x475ax8.ChatVisitorId)[_0x5f49[20]](function(_0x475axa){if(_0x475axa){return _0x475axa[_0x5f49[19]]({status:_0x5f49[28]})}})[_0x5f49[14]](function(_0x475ax9){console[_0x5f49[13]](_0x5f49[12],_0x475ax9)})}};if(_0x475ax8[_0x5f49[9]](_0x5f49[29])){if(_0x475ax8[_0x5f49[18]]){return ReportChatRoomModel[_0x5f49[19]]({crating:_0x475ax8[_0x5f49[29]],cratingMessage:_0x475ax8[_0x5f49[30]]},{where:{roomid:_0x475ax8[_0x5f49[18]]},individualHooks:true})[_0x5f49[14]](function(_0x475ax9){console[_0x5f49[13]](_0x5f49[12],_0x475ax9)})}}})}module[_0x5f49[32]]= ChatRoom