mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-18 13:49:53 +01:00
Don't store received messages with timestamps in the future.
This commit is contained in:
@@ -1179,6 +1179,7 @@ DatabaseCleaner.Callback {
|
|||||||
*/
|
*/
|
||||||
private boolean storeMessage(T txn, ContactId c, Message m)
|
private boolean storeMessage(T txn, ContactId c, Message m)
|
||||||
throws DbException {
|
throws DbException {
|
||||||
|
if(m.getTimestamp() > clock.currentTimeMillis()) return false;
|
||||||
GroupId g = m.getGroup();
|
GroupId g = m.getGroup();
|
||||||
if(g == null) return storePrivateMessage(txn, m, c, true);
|
if(g == null) return storePrivateMessage(txn, m, c, true);
|
||||||
if(!db.containsVisibleSubscription(txn, c, g)) return false;
|
if(!db.containsVisibleSubscription(txn, c, g)) return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user