Built motion from commit 0630df9.|0.0.136
[motion.git] / server / config / ami / user.js
1 var _0xc61a=["\x6D\x6F\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x51\x75\x65\x75\x65\x4D\x65\x6D\x62\x65\x72\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x73\x74\x61\x74\x65\x55\x70\x64\x61\x74\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x73\x74\x61\x74\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x53\x49\x50\x2F","","\x72\x65\x70\x6C\x61\x63\x65","\x64\x65\x76\x69\x63\x65","\x71\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73\x55\x70\x64\x61\x74\x65","\x71\x75\x65\x75\x65","\x65\x76\x65\x6E\x74","\x51\x75\x65\x75\x65\x43\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x5B\x75\x73\x65\x72\x5D\x20\x73\x74\x61\x74\x75\x73\x20\x75\x70\x64\x61\x74\x65\x20\x65\x72\x72\x6F\x72\x3A\x20","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x5B\x75\x73\x65\x72\x5D\x20\x73\x74\x61\x74\x75\x73\x20\x75\x70\x64\x61\x74\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];var moment=require(_0xc61a[0]);var UserModel=require(_0xc61a[2])[_0xc61a[1]];function User(){console[_0xc61a[4]](_0xc61a[3])}User[_0xc61a[6]][_0xc61a[5]]= function(_0xaf90x4){var _0xaf90x5={status:_0xaf90x4[_0xc61a[7]],statusAt:moment()[_0xc61a[9]](_0xc61a[8])};var _0xaf90x6={name:_0xaf90x4[_0xc61a[13]][_0xc61a[12]](_0xc61a[10],_0xc61a[11])};return findAndUpdate(_0xaf90x5,_0xaf90x6)};User[_0xc61a[6]][_0xc61a[14]]= function(_0xaf90x7,_0xaf90x4){var _0xaf90x5={queueStatus:_0xaf90x7,queueStatusAt:moment()[_0xc61a[9]](_0xc61a[8]),lastQueue:_0xaf90x4[_0xc61a[15]]};var _0xaf90x6=(_0xaf90x4[_0xc61a[16]]=== _0xc61a[17])?{lastQueue:_0xaf90x4[_0xc61a[15]]}:{name:_0xaf90x4[_0xc61a[18]]};findAndUpdate(_0xaf90x5,_0xaf90x6);if(_0xaf90x7=== _0xc61a[19]){findAndUpdate({queueStatus:_0xc61a[20],queueStatusAt:moment()[_0xc61a[9]](_0xc61a[8])},{lastQueue:_0xaf90x4[_0xc61a[15]],name:{$ne:_0xaf90x4[_0xc61a[18]]}})}};function findAndUpdate(_0xaf90x5,_0xaf90x6){return UserModel[_0xc61a[26]](_0xaf90x5,{where:_0xaf90x6,individualHooks:true})[_0xc61a[25]](function(_0xaf90xa){console[_0xc61a[4]](_0xc61a[24])})[_0xc61a[23]](function(_0xaf90x9){console[_0xc61a[22]](_0xc61a[21]+ _0xaf90x9)})}module[_0xc61a[27]]= User