Don't store received messages with timestamps in the future.

This commit is contained in:
akwizgran
2013-01-28 23:20:25 +00:00
parent 2c27a0251a
commit 2ebbe0eb2a

View File

@@ -1179,6 +1179,7 @@ DatabaseCleaner.Callback {
*/
private boolean storeMessage(T txn, ContactId c, Message m)
throws DbException {
if(m.getTimestamp() > clock.currentTimeMillis()) return false;
GroupId g = m.getGroup();
if(g == null) return storePrivateMessage(txn, m, c, true);
if(!db.containsVisibleSubscription(txn, c, g)) return false;