Built motion from commit cd0bc86fd.|1.0.22
[motion.git] / server / config / forked_routing / mail / agent.js
1 var _0xdf43=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x65\x78\x70\x6F\x72\x74\x73","\x69\x64","\x66\x69\x6E\x64","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x63\x68\x61\x6E\x6E\x65\x6C","\x41\x50\x50\x20\x41\x47\x45\x4E\x54\x2C\x20\x41\x47\x45\x4E\x54\x20\x49\x44\x3A","\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x75\x6E\x69\x71\x75\x65\x69\x64","\x45\x52\x52\x4F\x52","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x61\x67\x65\x6E\x74\x3A\x25\x64","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x66\x6F\x72\x6D\x61\x74","\x74\x6F","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x61\x64\x6D\x69\x6E\x73","\x75\x73\x65\x72\x73","\x45\x4E\x44\x20\x28\x4E\x4F\x20\x41\x4E\x53\x57\x45\x52\x20\x42\x59\x20\x41\x47\x45\x4E\x54\x29","\x69\x6E\x66\x6F","\x74\x68\x65\x6E","\x63\x72\x65\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x72\x65\x71\x75\x65\x73\x74","\x74\x69\x6D\x65\x6F\x75\x74","\x54\x49\x4D\x45\x4F\x55\x54","\x53\x45\x43","\x61\x67\x65\x6E\x74","\x6E\x61\x6D\x65","\x6D\x65\x72\x67\x65","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C","\x53\x4B\x49\x50\x50\x45\x44\x20\x28\x41\x47\x45\x4E\x54\x20\x4E\x4F\x54\x20\x41\x56\x41\x49\x4C\x41\x42\x4C\x45\x29","\x72\x65\x73\x6F\x6C\x76\x65","\x73\x68\x6F\x77","\x55\x73\x65\x72","\x55\x73\x65\x72\x49\x64"];_0xdf43[0];var _=require(_0xdf43[1]);var util=require(_0xdf43[2]);var moment=require(_0xdf43[3]);var logger=require(_0xdf43[5])(_0xdf43[4]);module[_0xdf43[6]]= function(_0x58b3x5,_0x58b3x6,_0x58b3x7,_0x58b3x8,_0x58b3x9,_0x58b3xa){var _0x58b3xb=[];var _0x58b3xc;var _0x58b3xd;function _0x58b3xe(_0x58b3xf){var _0x58b3x10=_[_0xdf43[8]](_0x58b3xb,{id:_0x58b3xf[_0xdf43[7]]});return _0x58b3x10?true:false}return _0x58b3x9[_0xdf43[32]](_0xdf43[42],[_0xdf43[43],{where:{id:_0x58b3x5[_0xdf43[44]],online:true,mailPause:false}}])[_0xdf43[28]](function(_0x58b3xf){_0x58b3xd= _0x58b3xf;logger[_0xdf43[27]](_0x58b3x6[_0xdf43[10]][_0xdf43[9]](),_0xdf43[11],_0x58b3x5.UserId,_0xdf43[12],_0x58b3x6[_0xdf43[13]],_0xdf43[34],_0x58b3x5[_0xdf43[33]],_0xdf43[35]);if(_0x58b3xf){if(!_0x58b3xe(_0x58b3xd)){var _0x58b3x12=_[_0xdf43[38]](_0x58b3x6,{timeslot:_0x58b3x5[_0xdf43[33]],application:_0xdf43[36],membername:_0x58b3xf[_0xdf43[37]],memberid:_0x58b3xf[_0xdf43[7]],calledAt:moment()[_0xdf43[21]](_0xdf43[31]),joinAt:moment()[_0xdf43[21]](_0xdf43[31])});return _0x58b3x9[_0xdf43[32]](_0xdf43[29],[_0xdf43[30],_0x58b3x12])[_0xdf43[28]](function(_0x58b3x13){_0x58b3x8[_0xdf43[22]](_0xdf43[24])[_0xdf43[18]](_0xdf43[23],_0x58b3x13);_0x58b3x8[_0xdf43[22]](_0xdf43[25])[_0xdf43[18]](_0xdf43[23],_0x58b3x13);_0x58b3x8[_0xdf43[22]](util[_0xdf43[21]](_0xdf43[19],_0x58b3x13[_0xdf43[20]]))[_0xdf43[18]](_0xdf43[23],_0x58b3x13);return _0x58b3x9[_0xdf43[32]](_0xdf43[29],[_0xdf43[39],_0x58b3x12])})}}else {logger[_0xdf43[27]](_0x58b3x6[_0xdf43[10]][_0xdf43[9]](),_0xdf43[11],_0x58b3x5.UserId,_0xdf43[12],_0x58b3x6[_0xdf43[13]],_0xdf43[40]);_0x58b3xa();return Promise[_0xdf43[41]]()}})[_0xdf43[28]](function(_0x58b3x12){if(_0x58b3x12){_0x58b3x8[_0xdf43[22]](util[_0xdf43[21]](_0xdf43[19],_0x58b3x12[_0xdf43[20]]))[_0xdf43[18]](_0xdf43[17],_0x58b3x12);_0x58b3xc= setTimeout(function(){return _0x58b3x9[_0xdf43[32]](_0xdf43[29],[_0xdf43[30],{leaveAt:moment()[_0xdf43[21]](_0xdf43[31]),timeout:true},{where:{uniqueid:_0x58b3x6[_0xdf43[13]],leaveAt:null},individualHooks:true}])[_0xdf43[28]](function(_0x58b3x13){if(_0x58b3x13){_0x58b3x8[_0xdf43[22]](_0xdf43[24])[_0xdf43[18]](_0xdf43[23],_0x58b3x13);_0x58b3x8[_0xdf43[22]](_0xdf43[25])[_0xdf43[18]](_0xdf43[23],_0x58b3x13);_0x58b3x8[_0xdf43[22]](util[_0xdf43[21]](_0xdf43[19],_0x58b3x13[_0xdf43[20]]))[_0xdf43[18]](_0xdf43[23],_0x58b3x13)};logger[_0xdf43[27]](_0x58b3x6[_0xdf43[10]][_0xdf43[9]](),_0xdf43[11],_0x58b3x5.UserId,_0xdf43[12],_0x58b3x6[_0xdf43[13]],_0xdf43[26]);clearTimeout(_0x58b3xc);_0x58b3xa()})},_0x58b3x5[_0xdf43[33]]* 1000)}})[_0xdf43[16]](function(_0x58b3x11){logger[_0xdf43[15]](_0x58b3x6[_0xdf43[10]][_0xdf43[9]](),_0xdf43[11],_0x58b3x5.UserId,_0xdf43[12],_0x58b3x6[_0xdf43[13]],_0xdf43[14]);logger[_0xdf43[15]](_0x58b3x11);_0x58b3xa(_0x58b3x11)})}