cc282d17189253c1ccf5cf518dea848965beccc3
[motion.git] / server / api / report_chat_session / report_chat_session.socket.js
1 var _0xee93=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x74\x68\x65\x6E","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x75\x73\x65\x72\x49\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x45\x72\x72\x6F\x72\x20\x66\x69\x6C\x74\x65\x72\x69\x6E\x67\x20\x72\x65\x70\x6F\x72\x74\x20\x63\x68\x61\x74\x20\x73\x65\x73\x73\x69\x6F\x6E\x73\x20\x61\x66\x74\x65\x72\x20\x73\x61\x76\x65","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x61\x64\x6D\x69\x6E","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x71\x75\x65\x75\x65","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x61\x6C\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x72\x65\x6D\x6F\x76\x65"];_0xee93[0];const ReportChatSessionEvents=require(_0xee93[1]);const ReportChatSession=require(_0xee93[3])[_0xee93[2]];const User=require(_0xee93[3])[_0xee93[4]];const Util=require(_0xee93[5]);const _=require(_0xee93[6]);const Promise=require(_0xee93[7]);var events=[_0xee93[8],_0xee93[9]];exports[_0xee93[10]]= function(_0xf508x8){for(var _0xf508x9=0,_0xf508xa=events[_0xee93[11]];_0xf508x9< _0xf508xa;_0xf508x9++){var _0xf508xb=events[_0xf508x9];var _0xf508xc=createListener(_0xee93[12]+ _0xf508xb,_0xf508x8);ReportChatSessionEvents[_0xee93[13]](_0xf508xb,_0xf508xc);_0xf508x8[_0xee93[13]](_0xee93[14],removeListener(_0xf508xb,_0xf508xc))}};function createListener(_0xf508xb,_0xf508x8){return function(_0xf508xe){onSave(_0xf508x8,_0xf508xe)}}function removeListener(_0xf508xb,_0xf508xc){return function(){ReportChatSessionEvents[_0xee93[15]](_0xf508xb,_0xf508xc)}}function getChatQueues(_0xf508x11){return function(){switch(_0xf508x11[_0xee93[28]]){case _0xee93[25]:return User[_0xee93[24]](_0xf508x11[_0xee93[23]],{attributes:[_0xee93[16]]})[_0xee93[21]](Util[_0xee93[22]]({},{attributes:[_0xee93[16]],include:[{raw:true,model:User,attributes:[_0xee93[16]]}]}))[_0xee93[21]](function(_0xf508x12){var _0xf508x13=[];_0xf508x12[_0xee93[20]][_0xee93[19]](function(_0xf508x14){_0xf508x13= _[_0xee93[18]](_0xf508x13,_[_0xee93[17]](_0xf508x14.Users,_0xee93[16]))});return {queue:_[_0xee93[17]](_0xf508x12[_0xee93[20]],_0xee93[16]),memberid:_0xf508x13}});case _0xee93[27]:return User[_0xee93[24]](_0xf508x11[_0xee93[23]],{attributes:[_0xee93[16]]})[_0xee93[21]](function(_0xf508x15){return _0xf508x15[_0xee93[26]]({attributes:[_0xee93[16]]})})[_0xee93[21]](function(_0xf508x12){return {queue:_[_0xee93[17]](_0xf508x12,_0xee93[16]),memberid:_0xf508x11[_0xee93[23]]}});default:return {}}}}function onSave(_0xf508x8,_0xf508xe,_0xf508x17){return Promise[_0xee93[38]]([])[_0xee93[21]](getChatQueues(_0xf508x8))[_0xee93[21]](function(_0xf508x19){if(_0xf508x8[_0xee93[28]]=== _0xee93[32]|| _[_0xee93[34]](_0xf508x19[_0xee93[33]],_0xf508xe[_0xee93[33]])|| _[_0xee93[34]](_0xf508x19[_0xee93[35]],_0xf508xe[_0xee93[35]])){_0xf508x8[_0xee93[37]](_0xee93[36],_0xf508xe)}})[_0xee93[31]](function(_0xf508x18){console[_0xee93[30]](_0xee93[29],_0xf508x18)})}function onRemove(_0xf508x8,_0xf508xe,_0xf508x17){_0xf508x8[_0xee93[37]](_0xee93[39],_0xf508xe)}