Built motion from commit daed1922e.|1.0.22
[motion.git] / server / api / report_mail_session / report_mail_session.socket.js
1 var _0x91f2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\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\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x45\x72\x72\x6F\x72\x20\x66\x69\x6C\x74\x65\x72\x69\x6E\x67\x20\x72\x65\x70\x6F\x72\x74\x20\x6D\x61\x69\x6C\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","\x72\x6F\x6C\x65","\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","\x65\x6D\x69\x74","\x74\x68\x65\x6E","\x61\x6C\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x72\x65\x6D\x6F\x76\x65","\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","\x67\x65\x74\x4D\x61\x69\x6C\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\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74"];_0x91f2[0];const ReportMailSessionEvents=require(_0x91f2[1]);const User=require(_0x91f2[3])[_0x91f2[2]];const Util=require(_0x91f2[4]);const _=require(_0x91f2[5]);const Promise=require(_0x91f2[6]);var events=[_0x91f2[7],_0x91f2[8]];exports[_0x91f2[9]]= function(_0xa998x7){for(var _0xa998x8=0,_0xa998x9=events[_0x91f2[10]];_0xa998x8< _0xa998x9;_0xa998x8++){var _0xa998xa=events[_0xa998x8];var _0xa998xb=createListener(_0x91f2[11]+ _0xa998xa,_0xa998x7);ReportMailSessionEvents[_0x91f2[12]](_0xa998xa,_0xa998xb);_0xa998x7[_0x91f2[12]](_0x91f2[13],removeListener(_0xa998xa,_0xa998xb))}};function createListener(_0xa998xa,_0xa998x7){return function(_0xa998xd){switch(_0xa998xa){case _0x91f2[25]:return Promise[_0x91f2[24]]([])[_0x91f2[23]](getMailQueues(_0xa998x7))[_0x91f2[23]](function(_0xa998xf){if(_0xa998x7[_0x91f2[17]]=== _0x91f2[18]|| _[_0x91f2[20]](_0xa998xf[_0x91f2[19]],_0xa998xd[_0x91f2[19]])|| _[_0x91f2[20]](_0xa998xf[_0x91f2[21]],_0xa998xd[_0x91f2[21]])){_0xa998x7[_0x91f2[22]](_0xa998xa,_0xa998xd)}})[_0x91f2[16]](function(_0xa998xe){console[_0x91f2[15]](_0x91f2[14],_0xa998xe)});case _0x91f2[26]:_0xa998x7[_0x91f2[22]](_0xa998xa,_0xa998xd);break;default:}}}function removeListener(_0xa998xa,_0xa998xb){return function(){ReportMailSessionEvents[_0x91f2[27]](_0xa998xa,_0xa998xb)}}function getMailQueues(_0xa998x12){return function(){switch(_0xa998x12[_0x91f2[17]]){case _0x91f2[36]:return User[_0x91f2[35]](_0xa998x12[_0x91f2[34]],{attributes:[_0x91f2[28]]})[_0x91f2[23]](Util[_0x91f2[33]]({},{attributes:[_0x91f2[28]],include:[{raw:true,model:User,attributes:[_0x91f2[28]]}]}))[_0x91f2[23]](function(_0xa998x13){var _0xa998x14=[];_0xa998x13[_0x91f2[32]][_0x91f2[31]](function(_0xa998x15){_0xa998x14= _[_0x91f2[30]](_0xa998x14,_[_0x91f2[29]](_0xa998x15.Users,_0x91f2[28]))});return {queue:_[_0x91f2[29]](_0xa998x13[_0x91f2[32]],_0x91f2[28]),memberid:_0xa998x14}});case _0x91f2[38]:return User[_0x91f2[35]](_0xa998x12[_0x91f2[34]],{attributes:[_0x91f2[28]]})[_0x91f2[23]](function(_0xa998x16){return _0xa998x16[_0x91f2[37]]({attributes:[_0x91f2[28]]})})[_0x91f2[23]](function(_0xa998x13){return {queue:_[_0x91f2[29]](_0xa998x13,_0x91f2[28]),memberid:_0xa998x12[_0x91f2[34]]}});default:return {}}}}