Permalink
Browse files

More user cleanup, damn you LOL

  • Loading branch information...
1 parent 21d5724 commit e3bdff1b0e30350b50c62d8172e25ed00f23194b @zquestz committed Jul 29, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 simplechat.js
View
@@ -165,9 +165,8 @@ if (Meteor.is_server) {
var now = (new Date()).getTime();
Users.remove({last_seen: {$lt: (now - 60 * 1000)}});
- Messages.find({date: {$gt: new Date()}}).forEach(function (message) {
- Messages.update(message._id, {$set: {date: new Date()}});
- });
+ Users.remove({last_seen: {$gt: (now + 30)}});
+ Users.remove({last_seen: {$exists: false}});
}, 1000);
Meteor.methods({

0 comments on commit e3bdff1

Please sign in to comment.