Built motion from commit 503e72f.|0.0.143
[motion.git] / server / api / report_chat_session / report_chat_session.socket.js
index c999501..0c36e6e 100644 (file)
@@ -1 +1 @@
-var _0x3026=["\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"];_0x3026[0];const ReportChatSessionEvents=require(_0x3026[1]);const ReportChatSession=require(_0x3026[3])[_0x3026[2]];const User=require(_0x3026[3])[_0x3026[4]];const Util=require(_0x3026[5]);const _=require(_0x3026[6]);const Promise=require(_0x3026[7]);var events=[_0x3026[8],_0x3026[9]];exports[_0x3026[10]]= function(_0x191cx8){for(var _0x191cx9=0,_0x191cxa=events[_0x3026[11]];_0x191cx9< _0x191cxa;_0x191cx9++){var _0x191cxb=events[_0x191cx9];var _0x191cxc=createListener(_0x3026[12]+ _0x191cxb,_0x191cx8);ReportChatSessionEvents[_0x3026[13]](_0x191cxb,_0x191cxc);_0x191cx8[_0x3026[13]](_0x3026[14],removeListener(_0x191cxb,_0x191cxc))}};function createListener(_0x191cxb,_0x191cx8){return function(_0x191cxe){onSave(_0x191cx8,_0x191cxe)}}function removeListener(_0x191cxb,_0x191cxc){return function(){ReportChatSessionEvents[_0x3026[15]](_0x191cxb,_0x191cxc)}}function getChatQueues(_0x191cx11){return function(){switch(_0x191cx11[_0x3026[28]]){case _0x3026[25]:return User[_0x3026[24]](_0x191cx11[_0x3026[23]],{attributes:[_0x3026[16]]})[_0x3026[21]](Util[_0x3026[22]]({},{attributes:[_0x3026[16]],include:[{raw:true,model:User,attributes:[_0x3026[16]]}]}))[_0x3026[21]](function(_0x191cx12){var _0x191cx13=[];_0x191cx12[_0x3026[20]][_0x3026[19]](function(_0x191cx14){_0x191cx13= _[_0x3026[18]](_0x191cx13,_[_0x3026[17]](_0x191cx14.Users,_0x3026[16]))});return {queue:_[_0x3026[17]](_0x191cx12[_0x3026[20]],_0x3026[16]),memberid:_0x191cx13}});case _0x3026[27]:return User[_0x3026[24]](_0x191cx11[_0x3026[23]],{attributes:[_0x3026[16]]})[_0x3026[21]](function(_0x191cx15){return _0x191cx15[_0x3026[26]]({attributes:[_0x3026[16]]})})[_0x3026[21]](function(_0x191cx12){return {queue:_[_0x3026[17]](_0x191cx12,_0x3026[16]),memberid:_0x191cx11[_0x3026[23]]}});default:return {}}}}function onSave(_0x191cx8,_0x191cxe,_0x191cx17){return Promise[_0x3026[38]]([])[_0x3026[21]](getChatQueues(_0x191cx8))[_0x3026[21]](function(_0x191cx19){if(_0x191cx8[_0x3026[28]]=== _0x3026[32]|| _[_0x3026[34]](_0x191cx19[_0x3026[33]],_0x191cxe[_0x3026[33]])|| _[_0x3026[34]](_0x191cx19[_0x3026[35]],_0x191cxe[_0x3026[35]])){_0x191cx8[_0x3026[37]](_0x3026[36],_0x191cxe)}})[_0x3026[31]](function(_0x191cx18){console[_0x3026[30]](_0x3026[29],_0x191cx18)})}function onRemove(_0x191cx8,_0x191cxe,_0x191cx17){_0x191cx8[_0x3026[37]](_0x3026[39],_0x191cxe)}
\ No newline at end of file
+var _0x707a=["\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"];_0x707a[0];const ReportChatSessionEvents=require(_0x707a[1]);const ReportChatSession=require(_0x707a[3])[_0x707a[2]];const User=require(_0x707a[3])[_0x707a[4]];const Util=require(_0x707a[5]);const _=require(_0x707a[6]);const Promise=require(_0x707a[7]);var events=[_0x707a[8],_0x707a[9]];exports[_0x707a[10]]= function(_0x94f3x8){for(var _0x94f3x9=0,_0x94f3xa=events[_0x707a[11]];_0x94f3x9< _0x94f3xa;_0x94f3x9++){var _0x94f3xb=events[_0x94f3x9];var _0x94f3xc=createListener(_0x707a[12]+ _0x94f3xb,_0x94f3x8);ReportChatSessionEvents[_0x707a[13]](_0x94f3xb,_0x94f3xc);_0x94f3x8[_0x707a[13]](_0x707a[14],removeListener(_0x94f3xb,_0x94f3xc))}};function createListener(_0x94f3xb,_0x94f3x8){return function(_0x94f3xe){onSave(_0x94f3x8,_0x94f3xe)}}function removeListener(_0x94f3xb,_0x94f3xc){return function(){ReportChatSessionEvents[_0x707a[15]](_0x94f3xb,_0x94f3xc)}}function getChatQueues(_0x94f3x11){return function(){switch(_0x94f3x11[_0x707a[28]]){case _0x707a[25]:return User[_0x707a[24]](_0x94f3x11[_0x707a[23]],{attributes:[_0x707a[16]]})[_0x707a[21]](Util[_0x707a[22]]({},{attributes:[_0x707a[16]],include:[{raw:true,model:User,attributes:[_0x707a[16]]}]}))[_0x707a[21]](function(_0x94f3x12){var _0x94f3x13=[];_0x94f3x12[_0x707a[20]][_0x707a[19]](function(_0x94f3x14){_0x94f3x13= _[_0x707a[18]](_0x94f3x13,_[_0x707a[17]](_0x94f3x14.Users,_0x707a[16]))});return {queue:_[_0x707a[17]](_0x94f3x12[_0x707a[20]],_0x707a[16]),memberid:_0x94f3x13}});case _0x707a[27]:return User[_0x707a[24]](_0x94f3x11[_0x707a[23]],{attributes:[_0x707a[16]]})[_0x707a[21]](function(_0x94f3x15){return _0x94f3x15[_0x707a[26]]({attributes:[_0x707a[16]]})})[_0x707a[21]](function(_0x94f3x12){return {queue:_[_0x707a[17]](_0x94f3x12,_0x707a[16]),memberid:_0x94f3x11[_0x707a[23]]}});default:return {}}}}function onSave(_0x94f3x8,_0x94f3xe,_0x94f3x17){return Promise[_0x707a[38]]([])[_0x707a[21]](getChatQueues(_0x94f3x8))[_0x707a[21]](function(_0x94f3x19){if(_0x94f3x8[_0x707a[28]]=== _0x707a[32]|| _[_0x707a[34]](_0x94f3x19[_0x707a[33]],_0x94f3xe[_0x707a[33]])|| _[_0x707a[34]](_0x94f3x19[_0x707a[35]],_0x94f3xe[_0x707a[35]])){_0x94f3x8[_0x707a[37]](_0x707a[36],_0x94f3xe)}})[_0x707a[31]](function(_0x94f3x18){console[_0x707a[30]](_0x707a[29],_0x94f3x18)})}function onRemove(_0x94f3x8,_0x94f3xe,_0x94f3x17){_0x94f3x8[_0x707a[37]](_0x707a[39],_0x94f3xe)}
\ No newline at end of file