Built motion from commit d9055ebe5.|1.0.37
[motion.git] / server / api / report_chat_session / report_chat_session.socket.js
index 9ed7c55..137b957 100644 (file)
@@ -1 +1 @@
-var _0x4d37=["\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"];_0x4d37[0];const ReportChatSessionEvents=require(_0x4d37[1]);const ReportChatSession=require(_0x4d37[3])[_0x4d37[2]];const User=require(_0x4d37[3])[_0x4d37[4]];const Util=require(_0x4d37[5]);const _=require(_0x4d37[6]);const Promise=require(_0x4d37[7]);var events=[_0x4d37[8],_0x4d37[9]];exports[_0x4d37[10]]= function(_0x7054x8){for(var _0x7054x9=0,_0x7054xa=events[_0x4d37[11]];_0x7054x9< _0x7054xa;_0x7054x9++){var _0x7054xb=events[_0x7054x9];var _0x7054xc=createListener(_0x4d37[12]+ _0x7054xb,_0x7054x8);ReportChatSessionEvents[_0x4d37[13]](_0x7054xb,_0x7054xc);_0x7054x8[_0x4d37[13]](_0x4d37[14],removeListener(_0x7054xb,_0x7054xc))}};function createListener(_0x7054xb,_0x7054x8){return function(_0x7054xe){onSave(_0x7054x8,_0x7054xe)}}function removeListener(_0x7054xb,_0x7054xc){return function(){ReportChatSessionEvents[_0x4d37[15]](_0x7054xb,_0x7054xc)}}function getChatQueues(_0x7054x11){return function(){switch(_0x7054x11[_0x4d37[28]]){case _0x4d37[25]:return User[_0x4d37[24]](_0x7054x11[_0x4d37[23]],{attributes:[_0x4d37[16]]})[_0x4d37[21]](Util[_0x4d37[22]]({},{attributes:[_0x4d37[16]],include:[{raw:true,model:User,attributes:[_0x4d37[16]]}]}))[_0x4d37[21]](function(_0x7054x12){var _0x7054x13=[];_0x7054x12[_0x4d37[20]][_0x4d37[19]](function(_0x7054x14){_0x7054x13= _[_0x4d37[18]](_0x7054x13,_[_0x4d37[17]](_0x7054x14.Users,_0x4d37[16]))});return {queue:_[_0x4d37[17]](_0x7054x12[_0x4d37[20]],_0x4d37[16]),memberid:_0x7054x13}});case _0x4d37[27]:return User[_0x4d37[24]](_0x7054x11[_0x4d37[23]],{attributes:[_0x4d37[16]]})[_0x4d37[21]](function(_0x7054x15){return _0x7054x15[_0x4d37[26]]({attributes:[_0x4d37[16]]})})[_0x4d37[21]](function(_0x7054x12){return {queue:_[_0x4d37[17]](_0x7054x12,_0x4d37[16]),memberid:_0x7054x11[_0x4d37[23]]}});default:return {}}}}function onSave(_0x7054x8,_0x7054xe,_0x7054x17){return Promise[_0x4d37[38]]([])[_0x4d37[21]](getChatQueues(_0x7054x8))[_0x4d37[21]](function(_0x7054x19){if(_0x7054x8[_0x4d37[28]]=== _0x4d37[32]|| _[_0x4d37[34]](_0x7054x19[_0x4d37[33]],_0x7054xe[_0x4d37[33]])|| _[_0x4d37[34]](_0x7054x19[_0x4d37[35]],_0x7054xe[_0x4d37[35]])){_0x7054x8[_0x4d37[37]](_0x4d37[36],_0x7054xe)}})[_0x4d37[31]](function(_0x7054x18){console[_0x4d37[30]](_0x4d37[29],_0x7054x18)})}function onRemove(_0x7054x8,_0x7054xe,_0x7054x17){_0x7054x8[_0x4d37[37]](_0x4d37[39],_0x7054xe)}
\ No newline at end of file
+var _0xe1ae=["\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"];_0xe1ae[0];const ReportChatSessionEvents=require(_0xe1ae[1]);const ReportChatSession=require(_0xe1ae[3])[_0xe1ae[2]];const User=require(_0xe1ae[3])[_0xe1ae[4]];const Util=require(_0xe1ae[5]);const _=require(_0xe1ae[6]);const Promise=require(_0xe1ae[7]);var events=[_0xe1ae[8],_0xe1ae[9]];exports[_0xe1ae[10]]= function(_0xc873x8){for(var _0xc873x9=0,_0xc873xa=events[_0xe1ae[11]];_0xc873x9< _0xc873xa;_0xc873x9++){var _0xc873xb=events[_0xc873x9];var _0xc873xc=createListener(_0xe1ae[12]+ _0xc873xb,_0xc873x8);ReportChatSessionEvents[_0xe1ae[13]](_0xc873xb,_0xc873xc);_0xc873x8[_0xe1ae[13]](_0xe1ae[14],removeListener(_0xc873xb,_0xc873xc))}};function createListener(_0xc873xb,_0xc873x8){return function(_0xc873xe){onSave(_0xc873x8,_0xc873xe)}}function removeListener(_0xc873xb,_0xc873xc){return function(){ReportChatSessionEvents[_0xe1ae[15]](_0xc873xb,_0xc873xc)}}function getChatQueues(_0xc873x11){return function(){switch(_0xc873x11[_0xe1ae[28]]){case _0xe1ae[25]:return User[_0xe1ae[24]](_0xc873x11[_0xe1ae[23]],{attributes:[_0xe1ae[16]]})[_0xe1ae[21]](Util[_0xe1ae[22]]({},{attributes:[_0xe1ae[16]],include:[{raw:true,model:User,attributes:[_0xe1ae[16]]}]}))[_0xe1ae[21]](function(_0xc873x12){var _0xc873x13=[];_0xc873x12[_0xe1ae[20]][_0xe1ae[19]](function(_0xc873x14){_0xc873x13= _[_0xe1ae[18]](_0xc873x13,_[_0xe1ae[17]](_0xc873x14.Users,_0xe1ae[16]))});return {queue:_[_0xe1ae[17]](_0xc873x12[_0xe1ae[20]],_0xe1ae[16]),memberid:_0xc873x13}});case _0xe1ae[27]:return User[_0xe1ae[24]](_0xc873x11[_0xe1ae[23]],{attributes:[_0xe1ae[16]]})[_0xe1ae[21]](function(_0xc873x15){return _0xc873x15[_0xe1ae[26]]({attributes:[_0xe1ae[16]]})})[_0xe1ae[21]](function(_0xc873x12){return {queue:_[_0xe1ae[17]](_0xc873x12,_0xe1ae[16]),memberid:_0xc873x11[_0xe1ae[23]]}});default:return {}}}}function onSave(_0xc873x8,_0xc873xe,_0xc873x17){return Promise[_0xe1ae[38]]([])[_0xe1ae[21]](getChatQueues(_0xc873x8))[_0xe1ae[21]](function(_0xc873x19){if(_0xc873x8[_0xe1ae[28]]=== _0xe1ae[32]|| _[_0xe1ae[34]](_0xc873x19[_0xe1ae[33]],_0xc873xe[_0xe1ae[33]])|| _[_0xe1ae[34]](_0xc873x19[_0xe1ae[35]],_0xc873xe[_0xe1ae[35]])){_0xc873x8[_0xe1ae[37]](_0xe1ae[36],_0xc873xe)}})[_0xe1ae[31]](function(_0xc873x18){console[_0xe1ae[30]](_0xe1ae[29],_0xc873x18)})}function onRemove(_0xc873x8,_0xc873xe,_0xc873x17){_0xc873x8[_0xe1ae[37]](_0xe1ae[39],_0xc873xe)}
\ No newline at end of file