Built motion from commit fd18f58.|0.0.129
[motion.git] / server / api / report_chat_session / report_chat_session.socket.js
index 77d513c..53b2a5c 100644 (file)
@@ -1 +1 @@
-var _0xbe54=["\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"];_0xbe54[0];var ReportChatSession=require(_0xbe54[2])[_0xbe54[1]];var User=require(_0xbe54[2])[_0xbe54[3]];var Util=require(_0xbe54[4]);var _=require(_0xbe54[5]);var Promise=require(_0xbe54[6]);exports[_0xbe54[7]]=function(_0xa373x6){ReportChatSession[_0xbe54[8]](function(_0xa373x7){onSave(_0xa373x6,_0xa373x7)});ReportChatSession[_0xbe54[9]](function(_0xa373x7){onSave(_0xa373x6,_0xa373x7)});ReportChatSession[_0xbe54[10]](function(_0xa373x7){onRemove(_0xa373x6,_0xa373x7)})};function getChatQueues(_0xa373x9){return function(){switch(_0xa373x9[_0xbe54[23]]){case _0xbe54[20]:return User[_0xbe54[19]](_0xa373x9[_0xbe54[18]],{attributes:[_0xbe54[11]]})[_0xbe54[16]](Util[_0xbe54[17]]({},{attributes:[_0xbe54[11]],include:[{raw:true,model:User,attributes:[_0xbe54[11]]}]}))[_0xbe54[16]](function(_0xa373xa){var _0xa373xb=[];_0xa373xa[_0xbe54[15]][_0xbe54[14]](function(_0xa373xc){_0xa373xb=_[_0xbe54[13]](_0xa373xb,_[_0xbe54[12]](_0xa373xc.Users,_0xbe54[11]))});return {queueid:_[_0xbe54[12]](_0xa373xa[_0xbe54[15]],_0xbe54[11]),memberid:_0xa373xb}});case _0xbe54[22]:return User[_0xbe54[19]](_0xa373x9[_0xbe54[18]],{attributes:[_0xbe54[11]]})[_0xbe54[16]](function(_0xa373xd){return _0xa373xd[_0xbe54[21]]({attributes:[_0xbe54[11]]})})[_0xbe54[16]](function(_0xa373xa){return {queueid:_[_0xbe54[12]](_0xa373xa,_0xbe54[11]),memberid:_0xa373x9[_0xbe54[18]]}});default:return {}}}}function onSave(_0xa373x6,_0xa373x7,_0xa373xf){return Promise[_0xbe54[33]]([])[_0xbe54[16]](getChatQueues(_0xa373x6))[_0xbe54[16]](function(_0xa373x11){if(_0xa373x6[_0xbe54[23]]===_0xbe54[27]||_[_0xbe54[29]](_0xa373x11[_0xbe54[28]],_0xa373x7[_0xbe54[28]])||_[_0xbe54[29]](_0xa373x11[_0xbe54[30]],_0xa373x7[_0xbe54[30]])){_0xa373x6[_0xbe54[32]](_0xbe54[31],_0xa373x7)}})[_0xbe54[26]](function(_0xa373x10){console[_0xbe54[25]](_0xbe54[24],_0xa373x10)})}function onRemove(_0xa373x6,_0xa373x7,_0xa373xf){_0xa373x6[_0xbe54[32]](_0xbe54[34],_0xa373x7)}
\ No newline at end of file
+var _0xccfb=["\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"];_0xccfb[0];const ReportChatSessionEvents=require(_0xccfb[1]);const ReportChatSession=require(_0xccfb[3])[_0xccfb[2]];const User=require(_0xccfb[3])[_0xccfb[4]];const Util=require(_0xccfb[5]);const _=require(_0xccfb[6]);const Promise=require(_0xccfb[7]);var events=[_0xccfb[8],_0xccfb[9]];exports[_0xccfb[10]]= function(_0x7f81x8){for(var _0x7f81x9=0,_0x7f81xa=events[_0xccfb[11]];_0x7f81x9< _0x7f81xa;_0x7f81x9++){var _0x7f81xb=events[_0x7f81x9];var _0x7f81xc=createListener(_0xccfb[12]+ _0x7f81xb,_0x7f81x8);ReportChatSessionEvents[_0xccfb[13]](_0x7f81xb,_0x7f81xc);_0x7f81x8[_0xccfb[13]](_0xccfb[14],removeListener(_0x7f81xb,_0x7f81xc))}};function createListener(_0x7f81xb,_0x7f81x8){return function(_0x7f81xe){onSave(_0x7f81x8,_0x7f81xe)}}function removeListener(_0x7f81xb,_0x7f81xc){return function(){ReportChatSessionEvents[_0xccfb[15]](_0x7f81xb,_0x7f81xc)}}function getChatQueues(_0x7f81x11){return function(){switch(_0x7f81x11[_0xccfb[28]]){case _0xccfb[25]:return User[_0xccfb[24]](_0x7f81x11[_0xccfb[23]],{attributes:[_0xccfb[16]]})[_0xccfb[21]](Util[_0xccfb[22]]({},{attributes:[_0xccfb[16]],include:[{raw:true,model:User,attributes:[_0xccfb[16]]}]}))[_0xccfb[21]](function(_0x7f81x12){var _0x7f81x13=[];_0x7f81x12[_0xccfb[20]][_0xccfb[19]](function(_0x7f81x14){_0x7f81x13= _[_0xccfb[18]](_0x7f81x13,_[_0xccfb[17]](_0x7f81x14.Users,_0xccfb[16]))});return {queue:_[_0xccfb[17]](_0x7f81x12[_0xccfb[20]],_0xccfb[16]),memberid:_0x7f81x13}});case _0xccfb[27]:return User[_0xccfb[24]](_0x7f81x11[_0xccfb[23]],{attributes:[_0xccfb[16]]})[_0xccfb[21]](function(_0x7f81x15){return _0x7f81x15[_0xccfb[26]]({attributes:[_0xccfb[16]]})})[_0xccfb[21]](function(_0x7f81x12){return {queue:_[_0xccfb[17]](_0x7f81x12,_0xccfb[16]),memberid:_0x7f81x11[_0xccfb[23]]}});default:return {}}}}function onSave(_0x7f81x8,_0x7f81xe,_0x7f81x17){return Promise[_0xccfb[38]]([])[_0xccfb[21]](getChatQueues(_0x7f81x8))[_0xccfb[21]](function(_0x7f81x19){if(_0x7f81x8[_0xccfb[28]]=== _0xccfb[32]|| _[_0xccfb[34]](_0x7f81x19[_0xccfb[33]],_0x7f81xe[_0xccfb[33]])|| _[_0xccfb[34]](_0x7f81x19[_0xccfb[35]],_0x7f81xe[_0xccfb[35]])){_0x7f81x8[_0xccfb[37]](_0xccfb[36],_0x7f81xe)}})[_0xccfb[31]](function(_0x7f81x18){console[_0xccfb[30]](_0xccfb[29],_0x7f81x18)})}function onRemove(_0x7f81x8,_0x7f81xe,_0x7f81x17){_0x7f81x8[_0xccfb[37]](_0xccfb[39],_0x7f81xe)}
\ No newline at end of file