Built motion from commit 344422e17.|1.0.22
[motion.git] / server / config / tools / chatRoom.js
1 var _0xe92b=["\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","\x63\x68\x61\x74","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\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","\x43\x68\x61\x74\x20\x72\x6F\x6F\x6D\x20\x63\x6C\x6F\x73\x65\x20\x65\x72\x72\x6F\x72","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\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","\x41\x42\x41\x4E\x44\x4F\x4E","\x43\x68\x61\x74\x20\x72\x6F\x6F\x6D\x20\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x20\x65\x72\x72\x6F\x72","\x61\x62\x61\x6E\x64\x6F\x6E","\x72\x61\x74\x69\x6E\x67","\x43\x68\x61\x74\x20\x72\x6F\x6F\x6D\x20\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x20\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"];_0xe92b[0];var _=require(_0xe92b[1]);var moment=require(_0xe92b[2]);var ChatRoomModel=require(_0xe92b[4])[_0xe92b[3]];var ChatVisitorModel=require(_0xe92b[4])[_0xe92b[5]];var ReportChatSessionModel=require(_0xe92b[4])[_0xe92b[6]];var ReportChatRoomModel=require(_0xe92b[4])[_0xe92b[7]];var logger=require(_0xe92b[9])(_0xe92b[8]);function ChatRoom(){ChatRoomModel[_0xe92b[34]](function(_0xe82cx9){if(_0xe82cx9[_0xe92b[11]](_0xe92b[10])&& _0xe82cx9[_0xe92b[10]]=== _0xe92b[12]){if(_0xe82cx9[_0xe92b[13]]){return ChatVisitorModel[_0xe92b[27]](_0xe82cx9.ChatVisitorId)[_0xe92b[23]](function(_0xe82cxb){if(_0xe82cxb){var _0xe82cxc=_[_0xe92b[25]](_0xe82cxb,{status:_0xe92b[24]});return _0xe82cxc[_0xe92b[26]]()}})[_0xe92b[23]](function(){return ReportChatSessionModel[_0xe92b[22]]({complete:true,completeReason:_0xe82cx9[_0xe92b[18]],completeAt:moment()[_0xe92b[20]](_0xe92b[19])},{where:{roomid:_0xe82cx9[_0xe92b[21]],complete:false,abandon:false,timeout:false},individualHooks:true})})[_0xe92b[17]](function(_0xe82cxa){logger[_0xe92b[16]](_0xe92b[14],_0xe82cxa[_0xe92b[15]])})}};if(_0xe82cx9[_0xe92b[11]](_0xe92b[10])&& _0xe82cx9[_0xe92b[10]]=== _0xe92b[28]){if(_0xe82cx9[_0xe92b[13]]){return ChatVisitorModel[_0xe92b[27]](_0xe82cx9.ChatVisitorId)[_0xe92b[23]](function(_0xe82cxb){if(_0xe82cxb){return _0xe82cxb[_0xe92b[22]]({status:_0xe92b[30]})}})[_0xe92b[17]](function(_0xe82cxa){logger[_0xe92b[16]](_0xe92b[29],_0xe82cxa[_0xe92b[15]])})}};if(_0xe82cx9[_0xe92b[11]](_0xe92b[31])){if(_0xe82cx9[_0xe92b[21]]){return ReportChatRoomModel[_0xe92b[22]]({crating:_0xe82cx9[_0xe92b[31]],cratingMessage:_0xe82cx9[_0xe92b[33]]},{where:{roomid:_0xe82cx9[_0xe92b[21]]},individualHooks:true})[_0xe92b[17]](function(_0xe82cxa){logger[_0xe92b[16]](_0xe92b[32],_0xe82cxa[_0xe92b[15]])})}}})}module[_0xe92b[35]]= ChatRoom