Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More user cleanup, damn you LOL

  • Loading branch information...
commit e3bdff1b0e30350b50c62d8172e25ed00f23194b 1 parent 21d5724
@zquestz authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 simplechat.js
View
5 simplechat.js
@@ -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({
Please sign in to comment.
Something went wrong with that request. Please try again.