Updated the visibility criteria of setStatusSeenIfVisible().

This commit is contained in:
akwizgran
2011-09-23 16:04:58 +01:00
parent 7c6e0c349c
commit ba1c61810d

View File

@@ -1888,13 +1888,13 @@ abstract class JdbcDatabase implements Database<Connection> {
+ " ON messages.groupId = contactSubscriptions.groupId"
+ " JOIN visibilities"
+ " ON messages.groupId = visibilities.groupId"
+ " AND contactSubscriptions.contactId = visibilities.contactId"
+ " WHERE messageId = ?"
+ " AND contactSubscriptions.contactId = ?"
+ " AND visibilities.contactId = ?";
+ " AND timestamp >= start";
ps = txn.prepareStatement(sql);
ps.setBytes(1, m.getBytes());
ps.setInt(2, c.getInt());
ps.setInt(3, c.getInt());
rs = ps.executeQuery();
boolean found = rs.next();
if(rs.next()) throw new DbStateException();