Permalink
Browse files

Redate messages from the future as right now instead of purging

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

0 comments on commit 8f2881c

Please sign in to comment.