Built motion from commit b18b7a808.|1.0.23
[motion.git] / server / api / report_chat_session / report_chat_session.socket.js
index 721ff1d..978f0be 100644 (file)
@@ -1 +1 @@
-var _0x7e75=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\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","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\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\x69\x64","\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"];_0x7e75[0];var ReportChatSession=require(_0x7e75[2])[_0x7e75[1]];var User=require(_0x7e75[2])[_0x7e75[3]];var Util=require(_0x7e75[4]);var _=require(_0x7e75[5]);var Promise=require(_0x7e75[6]);exports[_0x7e75[7]]=function(_0xad89x6){ReportChatSession[_0x7e75[8]](function(_0xad89x7){onSave(_0xad89x6,_0xad89x7)});ReportChatSession[_0x7e75[9]](function(_0xad89x7){onSave(_0xad89x6,_0xad89x7)});ReportChatSession[_0x7e75[10]](function(_0xad89x7){onRemove(_0xad89x6,_0xad89x7)})};function getChatQueues(_0xad89x9){return function(){switch(_0xad89x9[_0x7e75[23]]){case _0x7e75[20]:return User[_0x7e75[19]](_0xad89x9[_0x7e75[18]],{attributes:[_0x7e75[11]]})[_0x7e75[16]](Util[_0x7e75[17]]({},{attributes:[_0x7e75[11]],include:[{raw:true,model:User,attributes:[_0x7e75[11]]}]}))[_0x7e75[16]](function(_0xad89xa){var _0xad89xb=[];_0xad89xa[_0x7e75[15]][_0x7e75[14]](function(_0xad89xc){_0xad89xb=_[_0x7e75[13]](_0xad89xb,_[_0x7e75[12]](_0xad89xc.Users,_0x7e75[11]))});return {queueid:_[_0x7e75[12]](_0xad89xa[_0x7e75[15]],_0x7e75[11]),memberid:_0xad89xb}});case _0x7e75[22]:return User[_0x7e75[19]](_0xad89x9[_0x7e75[18]],{attributes:[_0x7e75[11]]})[_0x7e75[16]](function(_0xad89xd){return _0xad89xd[_0x7e75[21]]({attributes:[_0x7e75[11]]})})[_0x7e75[16]](function(_0xad89xa){return {queueid:_[_0x7e75[12]](_0xad89xa,_0x7e75[11]),memberid:_0xad89x9[_0x7e75[18]]}});default:return {}}}}function onSave(_0xad89x6,_0xad89x7,_0xad89xf){return Promise[_0x7e75[33]]([])[_0x7e75[16]](getChatQueues(_0xad89x6))[_0x7e75[16]](function(_0xad89x11){if(_0xad89x6[_0x7e75[23]]===_0x7e75[27]||_[_0x7e75[29]](_0xad89x11[_0x7e75[28]],_0xad89x7[_0x7e75[28]])||_[_0x7e75[29]](_0xad89x11[_0x7e75[30]],_0xad89x7[_0x7e75[30]])){_0xad89x6[_0x7e75[32]](_0x7e75[31],_0xad89x7)}})[_0x7e75[26]](function(_0xad89x10){console[_0x7e75[25]](_0x7e75[24],_0xad89x10)})}function onRemove(_0xad89x6,_0xad89x7,_0xad89xf){_0xad89x6[_0x7e75[32]](_0x7e75[34],_0xad89x7)}
\ No newline at end of file
+var _0x1a63=["\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"];_0x1a63[0];const ReportChatSessionEvents=require(_0x1a63[1]);const ReportChatSession=require(_0x1a63[3])[_0x1a63[2]];const User=require(_0x1a63[3])[_0x1a63[4]];const Util=require(_0x1a63[5]);const _=require(_0x1a63[6]);const Promise=require(_0x1a63[7]);var events=[_0x1a63[8],_0x1a63[9]];exports[_0x1a63[10]]= function(_0xa254x8){for(var _0xa254x9=0,_0xa254xa=events[_0x1a63[11]];_0xa254x9< _0xa254xa;_0xa254x9++){var _0xa254xb=events[_0xa254x9];var _0xa254xc=createListener(_0x1a63[12]+ _0xa254xb,_0xa254x8);ReportChatSessionEvents[_0x1a63[13]](_0xa254xb,_0xa254xc);_0xa254x8[_0x1a63[13]](_0x1a63[14],removeListener(_0xa254xb,_0xa254xc))}};function createListener(_0xa254xb,_0xa254x8){return function(_0xa254xe){onSave(_0xa254x8,_0xa254xe)}}function removeListener(_0xa254xb,_0xa254xc){return function(){ReportChatSessionEvents[_0x1a63[15]](_0xa254xb,_0xa254xc)}}function getChatQueues(_0xa254x11){return function(){switch(_0xa254x11[_0x1a63[28]]){case _0x1a63[25]:return User[_0x1a63[24]](_0xa254x11[_0x1a63[23]],{attributes:[_0x1a63[16]]})[_0x1a63[21]](Util[_0x1a63[22]]({},{attributes:[_0x1a63[16]],include:[{raw:true,model:User,attributes:[_0x1a63[16]]}]}))[_0x1a63[21]](function(_0xa254x12){var _0xa254x13=[];_0xa254x12[_0x1a63[20]][_0x1a63[19]](function(_0xa254x14){_0xa254x13= _[_0x1a63[18]](_0xa254x13,_[_0x1a63[17]](_0xa254x14.Users,_0x1a63[16]))});return {queue:_[_0x1a63[17]](_0xa254x12[_0x1a63[20]],_0x1a63[16]),memberid:_0xa254x13}});case _0x1a63[27]:return User[_0x1a63[24]](_0xa254x11[_0x1a63[23]],{attributes:[_0x1a63[16]]})[_0x1a63[21]](function(_0xa254x15){return _0xa254x15[_0x1a63[26]]({attributes:[_0x1a63[16]]})})[_0x1a63[21]](function(_0xa254x12){return {queue:_[_0x1a63[17]](_0xa254x12,_0x1a63[16]),memberid:_0xa254x11[_0x1a63[23]]}});default:return {}}}}function onSave(_0xa254x8,_0xa254xe,_0xa254x17){return Promise[_0x1a63[38]]([])[_0x1a63[21]](getChatQueues(_0xa254x8))[_0x1a63[21]](function(_0xa254x19){if(_0xa254x8[_0x1a63[28]]=== _0x1a63[32]|| _[_0x1a63[34]](_0xa254x19[_0x1a63[33]],_0xa254xe[_0x1a63[33]])|| _[_0x1a63[34]](_0xa254x19[_0x1a63[35]],_0xa254xe[_0x1a63[35]])){_0xa254x8[_0x1a63[37]](_0x1a63[36],_0xa254xe)}})[_0x1a63[31]](function(_0xa254x18){console[_0x1a63[30]](_0x1a63[29],_0xa254x18)})}function onRemove(_0xa254x8,_0xa254xe,_0xa254x17){_0xa254x8[_0x1a63[37]](_0x1a63[39],_0xa254xe)}
\ No newline at end of file